I'm looking for an example of a non-Euclidean non-compact Riemannian manifold $(M,g)$ such that we could define a non-constant affine function $f:M\rightarrow \mathbb{R}$, namely its gradient vector field is a killing vector field.