Update to Metrics v3 and provide generalized way to access metric registry