Certain non-flat, 2D metrics can be visualized as a 3D surface. The metric for the surface of the unit sphere, $$ds^2 = d\theta^2+\sin^2\theta\,d\phi^2,$$ would be the most familiar example. Others are more esoteric: in Martin's General Relativity: A Guide ..., he visualizes the following metric as a infinitely long trumpet-shaped surface: $$ds^2=\frac{1}{r^2}dr^2 + r^2d\phi^2,$$
What determines whether or not a 2D metric can be described by a 3D surface?