@Filter(value="${micronaut.metrics.http.path:/**}") @RequiresMetrics @Requires(property="micronaut.metrics.binders.web.enabled", value="true", defaultValue="true") public class ServerRequestMeterRegistryFilter extends OncePerRequestHttpServerFilter
The default is to intercept all paths /**, but using the property micronaut.metrics.http.path, this can be changed.
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ServerRequestMeterRegistryFilter(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Filter constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Publisher<MutableHttpResponse<?>> |
doFilterOnce(HttpRequest<?> httpRequest,
ServerFilterChain chain)
The method that will be invoked once per request.
|
doFilter, getKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doFilter
public ServerRequestMeterRegistryFilter(io.micrometer.core.instrument.MeterRegistry meterRegistry)
meterRegistry
- the meter registryprotected Publisher<MutableHttpResponse<?>> doFilterOnce(HttpRequest<?> httpRequest, ServerFilterChain chain)
doFilterOnce
in class OncePerRequestHttpServerFilter
httpRequest
- the http requestchain
- The ServerFilterChain
instance