Let $M$ be a smooth manifold, $f$ a smooth function on $M$, and $X$ a vector field on $M$ that ascends $f$, i.e. $df_p(X_p)>0$ for all $p\in M$. Are there choices of $(M,f,X)$ such that there is no Riemannian metric $g$ on $M$ in which $X=\nabla_g f$, where $\nabla_g$ is the gradient operator on $(M,g)$?
I'm looking for either general obstructions or an explicit example (i.e. an example where no such metric can be found).
Note that I'm not looking for obstructions to $X$ being the gradient of some function, but the gradient of a function fixed in advance, of which we already know that $X$ ascends it (a necessary condition).