use of com.srotya.sidewinder.core.SidewinderDropwizardReporter in project sidewinder by srotya.
the class MetricsRegistryService method getInstance.
public MetricRegistry getInstance(String key) {
MetricRegistry reg = registry.get(key);
if (reg == null) {
reg = new MetricRegistry();
if (!DISABLE_SELF_MONITORING) {
SidewinderDropwizardReporter reporter = new SidewinderDropwizardReporter(reg, key, new MetricFilter() {
@Override
public boolean matches(String name, Metric metric) {
return true;
}
}, TimeUnit.SECONDS, TimeUnit.SECONDS, engine, es);
reporter.start(1, TimeUnit.SECONDS);
this.reporter.put(key, reporter);
}
registry.put(key, reg);
}
return reg;
}
Aggregations