Can one relate $g(\nabla_XX,\nabla_YY) = |\nabla_XY|^2$ with some characteristic class?

Let $$(M^2,g)$$ be a closed surface and let $$X,Y\in C^{\infty}(TM)$$ such that $$[X,Y] = 0$$. I am working on a problem where I have to deal with the following term $$g(\nabla_XX,\nabla_YY) - |\nabla_XY|^2_g.$$

If one thinks about the connection matrix of $$\nabla$$ this looks a lot like something related to the determinant of this matrix. Is this expression related to some characteristic class? For example, in the case $$T^2$$ is a torus, should its integral be zero?

• Do you know tensorial properties of this thing? Is it a tensor or differential operator? Of what order if the latter? I can try to calculate it by myself but it is the first thing to check - if it is a tensor it should be a full contraction of covariant derivatives of curvature. – Lev Soukhanov Feb 5 '20 at 19:38
• I think invariant differential operators also should have some classification. You can look up this paper for the result im citing in the previous comment: F. Prüfer, F. Tricerri & L. Vanhecke, “Curvature invariants, differential operators and local homogeneity" – Lev Soukhanov Feb 5 '20 at 19:41