Burago, Burago, and Ivanov use the following definition on p.78, for metric spaces $(X,d)$, $(Y,\delta)$:
A map $f: X \to Y$ is called a local isometry at $x \in X$ if $x$ has a neighborhood $U_x$ such that (the restriction of) $f$ maps $U_x$ isometrically onto an open set $U_y$ in $Y$.
Based on this, I make the following definition:
A map $f: X \to X$ is called a local self-isometry at $x \in X$, or perhaps a local isometry anchored at $x \in X$, if $x$ has a neighborhood $U_x$ such that (the restriction of) $f$ maps $U_x$ isometrically onto a (possibly different) neighborhood $V_x$ of $x$, and if the map $f$ fixes $x$, i.e. $f(x) = x$.
EDIT: We could also say "pointed local isometries (autometries)", mirroring the terminology used in Theorem 10.10.1 on p.398 of Burago, Burago, Ivanov ("pointed homeomorphism"). /EDIT
If we don't require that $f$ fixes $x$, then $f$ could map onto a neighborhood of $x$ in a way which ("morally") is not "centered/focused" around $x$ (e.g. in Euclidean space a translation of $U_x$ to another neighborhood in which $x$ is closer or further from the boundary than before).
(The condition doesn't seem necessary to make the set a group, however, see below. Thus its purpose should be understood solely as a heuristic to avoid and exclude local isometries in which the presence of $x$ in the domain and range/image isn't an "afterthought", like for translations.)
Question: (a) Given a metric space $(X,d)$ and a point $x \in X$, does the set of all local self-isometries at $x$ form a group (which one might call the local isometry group at $x$)?
(b) If the answer to (a) is affirmative, what is this group for any point in Euclidean space? (It has to be the same at each point because of homogeneity.) Is it just $O(n)$?
Attempt: (a) Any isometry $f: X \to X$ is bijective, so has an inverse $f^{-1}: X \to X$, which is also clearly an isometry, since $f$ is. $d(f^{-1}(x_1),f^{-1}(x_2)) = d(f^{-1}(f(y_1)), f^{-1}(f(y_2))) = d(y_1, y_2)$, where $y_1$ and $y_2$ are the points such that $f(y_1) = x_1, f(y_2) = x_2$, and since $f$ is an isometry, $d(x_1, x_2) = d(f(x_1),f(x_2)) = d(y_1, y_2) = d(f^{-1}(x_1), f^{-1}(x_2))$, thus $f^{-1}$ is an isometry.
Now assume that $f$ is a local self-isometry at $x$. Then $f$ restricts to an isometry of $U_x$ onto $V_x$, for $U_x$ and $V_x$ neighborhoods of $x$. But that means that $f^{-1}$ restricts to an isometry of $V_x$ onto $U_x$, so $f^{-1}$ is a local self-isometry at $x$, so the set of all local self-isometries at $x$ is closed under inverses. (Since $f(x)=x$ implies that $f^{-1}(x) = f^{-1}(f(x)) = x$.)
The identity is obviously a local self-isometry at $x$ for any point $x \in X$ (because it maps any neighborhood $U_x$ of $x$ isometrically onto itself and fixes every point), and associativity follows from the associativity of function composition. So the set of local self-isometries at $x$ is a group.
(b) According to this document, exercise 40 on p. 9, every local isometry of Euclidean space extends to a global isometry. Therefore, it should be the case that any local self-isometry of Euclidean space extends to a global isometry which fixes $x$.
Perhaps another way to prove this is true is to note that every neighborhood of $x$ is homeomorphic to Euclidean space itself, thus in particular locally homeomorphic. Moreover, since Euclidean space is a length space, the metric coincides with the intrinsic metric, so every isometry is also an arcwise isometry. Then one might be able to use the result that every local homeomorphism which is an arcwise isometry is a local isometry to show the local isometry group is isomorphic to the group of (global) isometries for Euclidean space which fix $x$.
This question might also be relevant to finding an answer.
Anyway, since for any point $x$ in Euclidean space, the group of (global) isometries fixing $x$ is isomorphic to the orthogonal group $O(n)$, it would follow, if either of the above two arguments are correct, that the local isometry group at $x$ is isomorphic to $O(n)$.
Motivation: The notion of a "pointed local autometry group" is an attempt to fix this deficiencies of using "pointed (global) autometry groups", as pointed out here, for trying to define a notion of direction in arbitrary metric spaces, as well as of angle measure.