What is the definition of $\textbf{d}s$ in path integrals? I am aware that the length of a path $\gamma :[a,b] \rightarrow M$ is often defined as
\begin{equation}\tag{1} L = \int_{\gamma}\textbf{d}s \end{equation}
which can be rewritten in terms of the  metric tensor $g_{ij}$ as
\begin{equation} \tag{2} L = \int_{\gamma}\sqrt{g_{ij}\textbf{d}x^i\textbf{d}x^j} \end{equation}
For some coordinate system $(U, x^1,\ldots , x^m)$ for which $Im(\gamma)\subset U$ and $m = \dim(M)$. However it is not clear to me how one transitions from (1) to (2). Is there an object $s$ whose differential gives the expression in $(2)$. Also, I would assume if there is such an object, we are really talking about $|\textbf{d}s|$. In both $(1)$ and $(2)$, the interpretation is clear; in $(1)$ $\textbf{d}s$ is a differential length and in $(2)$ the metric tensor gives the metric in the tangent space at a given point on the manifold, and the whole expression is the length of a differential segment. So to clarify my question, is there an algebraic process which allows one to go from $(1)$ to $(2)$ or is it just the recognition that the quantity in $(2)$ is the quantity we want to integrate over a path.
As a follow up question, why doesn't  $(2)$ account for orientation?
 A: The object $s$ is the arclength function. Since it is only defined along the curve the differential $\textbf{d}s$ is not, strictly speaking, defined, but we can make a $1$-form along the curve that produces the "right" result. You are right that $\int_{\gamma}\textbf{d}s$ should really be written as $\int_{\gamma}|\textbf{d}s|=\int_{\gamma}|\dot{\gamma}|dt$ in parametrization. Now $\textbf{d}s^2=g_{ij}\textbf{d}x^i\textbf{d}x^j$ is essentially the Pythagorean theorem applied to differentials, in the simplest Euclidean case it becomes recognizable $\textbf{d}s^2=\sum_i(\textbf{d}x^i)^2$. Here $\textbf{d}s^2=\textbf{d}s\cdot\textbf{d}s$, the dot product, and $|\textbf{d}s|$ is the magnitude of $\textbf{d}s$.
In general, the metric tensor $g$ is what gives the dot product on tangent and cotangent spaces. It is symmetric, so it is not a differential form (antisymmetric) and can not be written as $g_{ij}\textbf{d}x^i \wedge \textbf{d}x^j$. For precision, people sometimes write $g_{ij}\textbf{d}x^i \odot \textbf{d}x^j$, where $\odot$ is the symmetric product. Orientation does not usually come up in 1D integration, it is for integration over surfaces and higher dimensional objects that it matters.
