move metrics to .go file but still in rest/ package