This is my first post, and so I hope this response is above the minimum level of usefulness expected of a response on MO. Perhaps a start would be to consider metrics of the form $f(x,y)=g(g^{-1}(x) - g^{-1}(y))$, where $g$ is some invertible function. We can place restrictions on $g$ by considering the conditions for $f(x,y)$ to be a valid metric. Firstly, definiteness requires $f(x,x)=0$, so we have $g(g^{-1}(x) - g^{-1}(x))=0$, and so the definiteness requirement reduces to $g(x)=0$ iff $x=0$. Secondly, we have the symmetry requirement. Since we require $f(x,y) = f(y,x)$ it follows that $g(g^{-1}(x) - g^{-1}(y)) = g(g^{-1}(y) - g^{-1}(x))$ and so $g(x) = g(-x)$. Now, lets turn to the associativity requirement you have specified: $f(x,f(y,z))=f(f(x,y),z)$. We have $f(f(x,y),z)=g(g^{-1}(g(g^{-1}(x) - g^{-1}(y))) - g^{-1}(z))$. Since $f(f(x,y),z) = f(f(y,x),z)$, from the symmetry condition, $f(f(x,y),z)$ can be rewritten as $f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(y)-g^{-1}(z))$. Applying the identity operation $g^{-1}\circ g$ we obtain $f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(g(g^{-1}(y)-g^{-1} (z))))=f(f(y,z),x)$, and so by the symmetry again we obtain $f(f(x,y),z)=f(x,f(y,z))$. So the question reduces to whether there exists a function $g$ which is both even, invertible and has $g(0)=0$ which satisfies the triangle inequality. I suspect this can be expressed as a condition on the first derivative of $g$.