General Line Integral

Is there a relation between the Riemannian metric, $I$ (first fundamental form) and $d\vec{l}$ (the infinitesimal line element) used to calculate line integral of vector fields?

For example, if you consider the map for spherical co-ordinates

$\Phi:(r, \theta, \phi) \to (r\ sin(\theta)\ cos(\phi), r\ sin(\theta)\ sin(\phi), r\ cos(\theta))$

Then, $I = ds^2 = dr^2 + r\ d\theta^2 + r^2\ sin^2(\theta)\ d\phi^2$ and $d\vec{l} = dr\ \hat{r} + r\ d\theta \ \hat{\theta}+ r\ sin(\theta)\ d\phi\ \hat{\phi}$

And the basis vectors are not orthonormal $\{\partial_r, \partial_\theta, \partial_\phi \}$ and not equal to the normalized version $\{\hat{r}, \hat{\theta}, \hat{\phi}\}$

Consider a vector field in each basis: $\ \ \vec{v} = r^2 cos(\theta)\ \hat{r} + r\ sin(\theta)\ cos(\theta)\ \hat{\theta} + 3r\ \hat{\phi} = r^2 cos(\theta)\ \partial_r + sin(\theta)\ cos(\theta)\ \partial_\theta + \frac{3}{sin(\theta)}\ \partial_\theta$

Then the line integral along $\vec{v}$, $\vec{v}.d\vec{l}$, is just the usual dot product between these 2 vectors according to normal multivariable calculus in the normalised basis. Is there a way to interpret this in differential geometry also? I just don't understand why the dot product can be taken without involving the metric tensor. How does $d\vec{l}$ relate to $ds$ which is the square root of $ds^2$? Also, what is the basis for dl? It seems like it's using both tangent and cotangent basis :O It all looks the same but I can't understand how they are all related.