mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
report through jmx
This commit is contained in:
@@ -3,6 +3,7 @@ package com.commafeed.backend.metrics;
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.enterprise.inject.Produces;
|
||||
|
||||
import com.codahale.metrics.JmxReporter;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
|
||||
@ApplicationScoped
|
||||
@@ -12,6 +13,9 @@ public class MetricRegistryProducer {
|
||||
|
||||
@Produces
|
||||
public MetricRegistry produceMetricsRegistry() {
|
||||
final JmxReporter reporter = JmxReporter.forRegistry(registry).build();
|
||||
reporter.start();
|
||||
return registry;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user