use metrics registry instead of static class