return new MonitoredCounter(metricName, metricDescription, registry, unit);
}
private EventMetricCounters createEventMetricCounters(String beanName, String metric,
String metricDescription, Unit<?> unit) {
MonitoredCounter metricCounter = createMetric(beanName, metric, metricDescription + " ["
+ beanName + "]", unit);
MonitoredCounter totalCounter;
totalCounter = totalCountersAcrossEvents.get(metric);
if (totalCounter == null) {
totalCounter = new MonitoredCounter(getTotalMetricName(metric), metricDescription
+ " [TOTAL]", registry, unit);
totalCountersAcrossEvents.put(metric, totalCounter);
}
return new EventMetricCounters(metricCounter, totalCounter);