use of io.micrometer.jersey2.server.resources.TimedResource in project micrometer by micrometer-metrics.
the class MetricsRequestEventListenerTimedTest method configure.
@Override
protected Application configure() {
registry = new SimpleMeterRegistry();
longTaskRequestStartedLatch = new CountDownLatch(1);
longTaskRequestReleaseLatch = new CountDownLatch(1);
final MetricsApplicationEventListener listener = new MetricsApplicationEventListener(registry, new DefaultJerseyTagsProvider(), METRIC_NAME, false);
final ResourceConfig config = new ResourceConfig();
config.register(listener);
config.register(new TimedResource(longTaskRequestStartedLatch, longTaskRequestReleaseLatch));
config.register(TimedOnClassResource.class);
return config;
}
Aggregations