Let $\Gamma^a{}\_{bc}=\Gamma^a{}\_{cb}$ be a symmetric connection whose curvature is $$R^a{}\_{bcd}=\partial\_c\Gamma^a{}\_{bd}-\partial\_d\Gamma^a{}\_{bc}+\Gamma^a{}\_{ec}\Gamma^e{}\_{bd}-\Gamma^a{}\_{ed}\Gamma^e{}\_{bc}.$$ 


What conditions can we observe locally on $\Gamma^a{}\_{bc}$ or $R^a{}\_{bcd}$ to conclude that it is locally Riemannian? 



Locally Riemannian Connection
Perhaps I can offer some information and comment on this problem. An essential part of the problem is how to interpret terms such as 'observe', 'accessible', 'identify', as the OP wants to know how to write down a *computable* criterion for a torsion-free connection to be the Levi-Civita connection of a Riemannian metric. Of course, this requires that one specify what one means by *computable*. For example, the OP does not consider the holonomy criterion (i.e., that the holonomy be a compact group) to be 'accessible', so I suppose that this means that tools to determine the holonomy group are not to be counted as *computable*, for the purposes of this question.


Various articles in the literature purport to solve this problem by providing an 'algorithm' for finding a compatible metric (if it exists) that only involves computing derivatives. However, all of these 'algorithms' depend on making constant rank assumptions for various systems of linear equations. As long as these constant rank assumptions hold, they work fine, but it is possible to 'fool' them by constructing examples in which the constant rank assumptions do not hold.


For example, take two closed disks with smooth boundary, $D\_1$ and $D\_2$, in $\mathbb{R}^2$ whose interiors are disjoint. Let $g\_1$ be a metric on $\mathbb{R}^2$ that agrees with the flat metric $dx^2+dy^2$ outside of $D\_1$ but has nonzero curvature somewhere inside $D\_1$ and let $g\_2$ be a metric on $\mathbb{R}^2$ that agrees with the flat metric $dx^2+2dy^2$ outside of $D\_2$ but has nonzero curvature somewhere inside $D\_2$. One can even arrange that the curvature of $g\_i$ be nonzero in $D\_i$ away from some closed subset $K\_i$ that lies in the interior of $D\_i$, so do this. Now let $\nabla$ be the connection that agrees with the Levi-Civita connection $\nabla\_1$ of $g\_1$ outside the disk $D\_2$ and the Levi-Civita connection $\nabla\_2$ of $g\_2$ outside the disk $D\_1$. (The connections $\nabla\_i$ are equal outside the union of the interiors of $D\_1$ and $D\_2$.) Then $\nabla$ is not the Levi-Civita connection of any metric on $\mathbb{R}^2$. If the two closed disks do not intersect, then every point of $\mathbb{R}^2$ has an neighborhood that does not meet one of the disks, so there is a metric on that neighborhood (e.g., one of the $g\_i$) compatible with $\nabla$. Hence $\nabla$ is locally Riemannian. However, if the closed disks are tangent at one point, then that point has no open neighborhood on which $\nabla$ is Riemannian.


Note that the above example shows that the condition of being locally Riemannian is not a closed condition on germs of torsion-free connections in the plane (since it can hold on the complement of a point) and hence it cannot be determined just as the satisfaction of some system of partial differential equations on the connection.


Meanwhile, if one is willing to consider open conditions as well as closed conditions, then it is easy to write down *sufficient* conditions for a connection to be locally Riemannian that, beyond algebra, only require the ability to take derivatives and to test whether an expression is zero or not. These *'accessible' sufficient* conditions are not necessary, though.


For example, consider the $2$-dimensional case: Let $\nabla$ be a torsion-free connection on a simply-connected domain $U$ in the $x^1x^2$-plane, with connection coefficients $\Gamma^{i}\_{jk}=\Gamma^{i}\_{kj}$, let $\gamma^i\_j = \Gamma^{i}\_{jk}\,\mathrm{d}x^k$ be the entries of the $2$-by-$2$ matrix $\gamma$,
and write $\mathrm{d}\gamma+\gamma\wedge\gamma = R\,\mathrm{d}x^1\wedge\mathrm{d}x^2$, where $R= (R^i\_j)$ is a matrix of functions on $U$.


The first necessary condition is that $\mathrm{tr}(R) = R^1\_1+R^2\_2 = 0$, otherwise there would be no parallel volume form (and hence no parallel metric). (This is one first-order differential equation on $\nabla$.) 


Now, suppose the open condition that $\mathrm{det}(R) = r^2 > 0 $ for some positive function $r$ on $U$ (which, if $\gamma$ is to be a Riemannian connection, would follow from $R\not=0$). Once this condition is imposed, define a symmetric matrix $H$ of determinant $1$ by the rule
$$
H = \pm\frac{1}r\begin{pmatrix}R^2\_1& -R^1\_1\\ -R^1\_1 & -R^1\_2\end{pmatrix},
$$
with the sign chosen to make $H$ be positive definite. Then $H$ is the unique symmetric positive definite matrix of functions on $U$ that has determinant $1$ and satisfies the condition that $HR$ be skew-symmetric.


Finally then, $\nabla$ is a metric connection in $U$ if and only if the identity
$$
\mathrm{d}H + \mathrm{tr}(\gamma)\,H - H\gamma - {}^t\gamma H = 0
$$
holds. (This is only four second-order differential equations on $\nabla$, since, by construction, the trace of $H^{-1}\mathrm{d}H$ always vanishes. One can check that these four equations are independent.)


In fact, since $\mathrm{d}\bigl(\mathrm{tr}(\gamma)\bigr)=0$, and $U$ is supposed simply-connected, there exists a function $f$ on $U$ such that $\mathrm{tr}(\gamma) = \mathrm{d}f$, and then the symmetric matrix $G = \mathrm{e}^f H$ satisfies 
$$
\mathrm{d}G = G\gamma + {}^t\gamma G,
$$
and so the metric $g = G\_{ij}\,\mathrm{d}x^i\mathrm{d}x^j$ is parallel with respect to $\nabla$, and, up to a constant factor, it is the unique such metric.


Thus, a sufficient condition in this case is comprised by a first-order differential equation on $\nabla$, a strict inequality on the first derivatives of $\nabla$ (which is an open condition), and then four second-order differential equations on $\nabla$.


