public Counter createCounterPair(Unit<?> unit, String globalCounterName, String threadMetricName, String threadMetricSuffix, String description) { MonitoredCounter metric = new MonitoredCounter(globalCounterName, description, registry, unit); ThreadCounter threadCounter = new ThreadCounter.ThreadMapCounter(); ThreadMetric threadMetric = new ThreadValueMetric(threadMetricName, unit, threadMetricSuffix, description, threadCounter); metricSuite.addMetric(threadMetric); return new CounterPair(metric, threadCounter); }