The following contour integral is path dependent with the following results \begin{align} \oint_C\dfrac{dz}{z} = \begin{Bmatrix} 2\pi i && \text{when $z=0$ is inside C} \\ 0 && \text{when $z=0$ is outside C} \end{Bmatrix} \end{align}

however when I think of how the complex plane can be embedded to the surface of the Riemann sphere, I realize a contradiction. A loop which does not locally enclose a pole on a closed surface, such as the Riemann sphere, encloses it globally by going the other way around the closed surface. We are taught in complex analysis that all complex infinities converge at the same point, probably in reference to the Riemann sphere? This creates a contradiction on what it means to take a contour integral around a pole and not around a pole.

I am curious to know if this is a topology issue, because the difference between integrating on the complex plane versues the Riemann sphere, is there metrics are different

\begin{align} \text{plane metric} && |dz|^2 &=& dx^2+dy^2 \\ \text{sphere metric} && |dz|^2 &=& \dfrac{4}{1+x^2+y^2}(dx^2+dy^2) \end{align}

which would imply a different definition of the contour integral.

Why is the pole generally outside the contour loop when its outside the contour loop in 2D?