io.bdeploy.common.metrics.Metrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Public API including dependencies, ready to be used for integrations and plugins.
The newest version!
package io.bdeploy.common.metrics;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
/**
* Provides access to global {@link MetricRegistry}s by use case.
*/
public class Metrics {
public enum MetricGroup {
HTTP,
CLI,
HIVE
}
private Metrics() {
}
/**
* @param group the {@link MetricGroup} to get a {@link MetricRegistry} for.
* @return a {@link MetricRegistry} which can be used to create and track metrics.
*/
public static MetricRegistry getMetric(MetricGroup group) {
return SharedMetricRegistries.getOrCreate(group.name());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy