Class MetricsWebFilter
java.lang.Object
org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter
- All Implemented Interfaces:
WebFilter
Intercepts incoming HTTP requests handled by Spring WebFlux handlers and records
metrics about execution time and results.
- Since:
- 2.0.0
- Author:
- Jon Schneider, Brian Clozel
-
Constructor Summary
ConstructorDescriptionMetricsWebFilter
(io.micrometer.core.instrument.MeterRegistry registry, WebFluxTagsProvider tagsProvider, String metricName, AutoTimer autoTimer) Create a newMetricsWebFilter
. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
filter
(ServerWebExchange exchange, WebFilterChain chain)
-
Constructor Details
-
MetricsWebFilter
public MetricsWebFilter(io.micrometer.core.instrument.MeterRegistry registry, WebFluxTagsProvider tagsProvider, String metricName, AutoTimer autoTimer) Create a newMetricsWebFilter
.- Parameters:
registry
- the registry to which metrics are recordedtagsProvider
- provider for metrics tagsmetricName
- name of the metric to recordautoTimer
- the auto-timers to apply ornull
to disable auto-timing- Since:
- 2.2.0
-
-
Method Details