Should a metric always map into $\mathbf{R}$? Typically you see the definition of a metric as a function which maps $X\times X\to\mathbf{R},$ but does this always have to be the case? 
Motivating example: When you complete $\mathbf{Q}$ with the Archimedean metric you think of it as mapping into $\mathbf{R},$ but if you were to choose the $p$-adic metric instead it can only take values in $\{0\}\cup p^\mathbf{Z}$. These are elements of $\mathbf{Q}_p$ as well as $\mathbf{R}.$ The difference is then that either your metric maps into an ordered field or one where you can't define any ordering (but you still know that the distances can have different values).
Does not mapping a metric into $\mathbf{R}$ always lead to problems? And are the issues of the example above avoidable?
 A: It depends on what you want for your "metric". It makes perfect sense as far as the definition goes to replace $\mathbb{R}$ by any totally ordered abelian group. But of course the properties won't be the same...
First note that when you suggest to interpret $|x|_p = p^{-v_p(x)}$ as an element of $\mathbb{Q}_p$, this has the pretty annoying inconvenient that if $x_n\to 0$ in $\mathbb{Q}_p$ then $|x|_p\to \infty$, so this interpretation does not give the $p$-adic topology.
Then let's assume that you define a metric as a map $X\times X \to \Gamma$ where $\Gamma$ is a totally ordered abelian group, with the usual axioms for metrics. This does give you a topology on $X$ by defining open balls as usual, and taking them as a basis for the topology. 
But in general this topology need not be secound countable : this strongly uses the fact that  in $\mathbb{R}$ there is a sequence $(\varepsilon_n)$ such that $\varepsilon_n>0$ and every $x>0$ satisfies $x<\varepsilon_n$ for some $n$ (take $\varepsilon_n = \frac{1}{n}$). So if you want to keep this very crucial property of metric spaces, you need to assume that such a sequence $\varepsilon_n$ exists in $\Gamma$.
More importantly, if you want that $X$ is the union of the open balls $B(a,n)$ with $n\in \mathbb{N}$ for any $a\in X$, then you need that $\Gamma$ is archimedian (ie for any $\varepsilon>0$ and any $x\in \Gamma$ there in $n\in \mathbb{N}$ such that $n\varepsilon>x$). But that actually implies that $\Gamma$ can be embedded in $\mathbb{R}$ as an ordered group. So if you want that property for metric spaces, then you may assume $\Gamma = \mathbb{R}$ without loss of generality.
