Let $(M,g)$ be a riemannian Manifold, we can use the metric $g$ to obtain a metric $d_g:M\times M\to \mathbb{R}$.
I ask for a kind of converse, we can start with a metric $d:M\times M\to \mathbb{R}$ and ask when we can recover a metric $g$ such that $d=d_g$. What obstructions need to be required on $d$ so the answer is positive, at least necessary?