What is an isometry in terms of the metric tensor, not distances? I get that an isometry preserves distances, but I'm a bit confused about how to determine if something is an isometry using the metric only. Consider in 1D for simplicity:
$$
ds^2 = \frac{dx^2}{x^2}
$$
so that $g(x)=\tfrac{1}{x^2}.$ It is obvious that under a dilation $x\to  \Lambda x$, the $ds^2$ is invariant, but the metric isn't. In fact, if we actively do the transformation (not a coordinate change), the metric changes as:
$$
g(x)=\frac{1}{x^2} \to \frac{1}{(\Lambda x)^2} = \frac{1}{\Lambda^2}g(x)
$$
At the level of distances, an isometry is defined by $ds^2\to ds^2$. How do you define it at the level of the metric, i.e.,
$$
g(x)\to ?
$$
what must $?$ be for a generic transformation to be an isometry?
 A: Note that $ds^2$ and $g$ are different notations for the same concept (here a Riemannian or pseudo-Riemannian metric). Hence, in your case :
$$\frac{1}{x^2}dx^2 = ds^2 = g = \frac{1}{x^2}dx \otimes dx$$
Now consider some diffeomorphism $\varphi \in C^\infty(\mathbb{R}^\times,\mathbb{R}^\times)$ of $\mathbb{R}^\times:=\mathbb{R}\backslash\{0\}$ to itself. Then $\varphi$ will be an isometry of $(\mathbb{R}^\times,g)$ iff the pull-back of $g$ by $\varphi$ is equal to $g$, i.e. iff :
$$\varphi^*g = g$$
Your dilation $\varphi : \mathbb{R} \rightarrow \mathbb{R} ; x \mapsto \Lambda x$ is indeed an isometry.
Note : you could probably take weaker conditions on $\varphi$ than being a "diffeomorphism" (e.g. $\varphi(x) = |x|$ would work (as a local isometry)).
The "generic condition" to keep in mind is $\varphi^*g = g$. Now, if you want a (local) isometry between two (pseudo-)Riemannian manifolds $(X_1,g_1)$, $(X_2,g_2)$, this would translate as $\varphi^*g_2 = g_1$.
Your $g(x)$ function is $g(x) := g_x (\partial_x,\partial_x) = \frac{1}{x^2}$. It doesn't need to be preserved by $\varphi$. Only $g$ needs to be preserved by $\varphi$. We have $$(\varphi^*g)_x(\partial_x,\partial_x) = g_{\varphi(x)}(\varphi_*\partial_x,\varphi_*\partial_x)$$ i.e. $$(\varphi^* g) = g(\varphi(x))d (x\circ \varphi) \otimes d (x\circ\varphi)$$ Hence your $g(x)$ function does indeed transforms as $$\frac{1}{x^2}\mapsto \frac{1}{\Lambda^2x^2}$$ In general, the $g(x)$ function you are talking about transforms as $$g(x)\mapsto g(\varphi(x))$$ So the "?" you were looking for was $g(\varphi(x))$.
