I have read different posts about this subject, all focused on very specific assumptions (compactness, in $\mathbb{R}^N$, etc.). My question aims at a unifying goal.
Let $(X,d_X)$ and $(Y,d_Y)$ metric spaces and $\sigma:X\to Y$ a distance preserving map (isometry). Is it true that $\sigma$ is surjective if (maybe, and only if) $$\mathrm{diam}_X(X)\geq \mathrm{diam}_Y(Y) \, .$$
Update. [the answers below are illuminating]
Add the condition on $\sigma$ that there exists $x\in X$ such that balls in $X$ centered at $x$ are sent by $\sigma$ to balls in $Y$ centered at $\sigma(x)$.
Update 2. Even this condition is not sufficient as the example (of @Dry Bones) in the comments show. Any new guess on how to fix the hypotheses is welcome!
