compatification of $\mathbb{R}^2$ under a conformal metric I want to understand the following question:

Let $\delta$ be the Euclidean metric in $\mathbb{R}^2$. Is there any criteria for smooth function $u$ such that $(\mathbb{R}^2, e^{2u}\delta)$ can be compactified to a compact closed Riemannian surface?

For example, if $u(x,y)=\ln(\frac{2}{1+x^2+y^2})$, then $(\mathbb{R}^2, e^{2u}\delta)$ is the unit sphere minus the north pole. Hence $\mathbb{R}^2$ can be compactified under such metric.
I'm wondering is there a general criteria?
 A: As a Riemann surface, the plane can have only one compactification, the sphere.
Introducing a factor to the metric does not change the conformal structure. So whatever factor you put there, the resulting Riemann surface remains conformally equivalent to the plane and thus have one and only one compactification, namely the sphere. In other words, possible compactifications of a Riemann surface do not depend on the metric in the given conformal class.
Perhaps you are thinking of a metric completion, instead of compactification: metric completion means that you add to your metric space the infinite elements corresponding to equivalence classes of Cauchy sequences. If you are asking for which metrics this completion will add exactly one point at infinity, then the criterion is the following: for every $\epsilon>0$ there exists a compact such that for $z,w$ outside this
compact, the distance between $z$ and $w$ is less than $\epsilon$.
A: I answer the following question (which I think is the intention): Under which condition does there exist a compact Riemannian manifold $(M,g)$ and a chart $\phi=(x,y)\colon U\subset M\to \mathbb R^2$ such that the metric $$g_{\mid U}=\phi^*{e^{2u}\delta}?$$
Because every Riemannian metric induces a Riemann surface structure, $M$ must be diffeomorphic to the 2-sphere, see the answer of Alexandre Eremenko.
Then, you can use (conformal) coordiantes $(\tilde x,\tilde y)=\tfrac{1}{x^2+y^2}(x,-y)$ centered at infinity $\infty$ to compute wether for the given function $u$ the $(0,2)$-tensor extends smoothly as a Riemannian metric to   $\infty.$ This is a standard exercise in a first course on differential geometry.
