Say you have a two dimensional surface with a metric tensor $g_{mn}$ on which there are two points with coordinates $(\theta_1, \phi_1)$ and $(\theta_2,\phi_2)$, how would you calculate the distance between these points?
My initial idea would be to solve the geodesic equation:
$$\frac{d^2 x^a}{ds^2} + \Gamma^a_{\phantom a bc}\frac{dx^b}{ds}\frac{dx^c}{ds} = 0$$
Where $\Gamma^a_{\phantom abc}$ are the Christoffel Symbols.
Then, after solving the equation $x^a(s)$, I would calculate the length using the arc length formula,
$$s = \int^b_a \sqrt{\left(\frac{d\theta}{ds}\right)^2 + \left(\frac{d\phi}{ds} \right)^2} ds$$
Or maybe, since the above is calculation Euclidean distance:
$$s = \int^b_a \sqrt{g_{ab}\frac{dx^a}{ds}\frac{dx^b}{ds}} ds$$
Is this the correct method or is there an easier way to calculate it?
Note: What I'm trying to do is derive the formula for the Great Circle distance using the metric for a sphere,
$$\begin{bmatrix}r^2& 0\\0& r^2 \sin^2\theta\end{bmatrix}$$
with the Python gravipy library while still allowing any 2-dimensional metric to be used.