public class CounterApplicationEventListener extends Object implements org.glassfish.jersey.server.monitoring.ApplicationEventListener
ApplicationEventListener which registers CounterRequestEventListener for counting Jersey server requests.| Constructor and Description |
|---|
CounterApplicationEventListener(io.micrometer.core.instrument.MeterRegistry meterRegistry,
io.micrometer.jersey2.server.JerseyTagsProvider tagsProvider,
String metricName)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(org.glassfish.jersey.server.monitoring.ApplicationEvent event) |
org.glassfish.jersey.server.monitoring.RequestEventListener |
onRequest(org.glassfish.jersey.server.monitoring.RequestEvent requestEvent) |
public CounterApplicationEventListener(io.micrometer.core.instrument.MeterRegistry meterRegistry,
io.micrometer.jersey2.server.JerseyTagsProvider tagsProvider,
String metricName)
meterRegistry - MeterRegistry to report to.tagsProvider - JerseyTagsProvider to use for metrics tags based on the event. Note
that only JerseyTagsProvider.httpRequestTags(RequestEvent) is consulted here, as
the counting is done at the end of the event and this listener has no notion of
long-running tasks.metricName - Name of the metric to use.public void onEvent(org.glassfish.jersey.server.monitoring.ApplicationEvent event)
onEvent in interface org.glassfish.jersey.server.monitoring.ApplicationEventListenerpublic org.glassfish.jersey.server.monitoring.RequestEventListener onRequest(org.glassfish.jersey.server.monitoring.RequestEvent requestEvent)
onRequest in interface org.glassfish.jersey.server.monitoring.ApplicationEventListenerCopyright © 2024. All rights reserved.