public class CounterRequestEventListener extends Object implements org.glassfish.jersey.server.monitoring.RequestEventListener
RequestEventListener that increases a Micrometer counter once the request is
finished.| Constructor and Description |
|---|
CounterRequestEventListener(io.micrometer.core.instrument.MeterRegistry registry,
io.micrometer.jersey2.server.JerseyTagsProvider tagsProvider,
String metricName)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(org.glassfish.jersey.server.monitoring.RequestEvent event) |
public CounterRequestEventListener(io.micrometer.core.instrument.MeterRegistry registry,
io.micrometer.jersey2.server.JerseyTagsProvider tagsProvider,
String metricName)
registry - 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.Copyright © 2022. All rights reserved.