get rid of metrics package and fold that code into rest package