Class MetricsWebClientCustomizer
java.lang.Object
org.springframework.boot.actuate.metrics.web.reactive.client.MetricsWebClientCustomizer
- All Implemented Interfaces:
WebClientCustomizer
WebClientCustomizer
that configures the WebClient
to record request
metrics.- Since:
- 2.1.0
- Author:
- Brian Clozel
-
Constructor Summary
ConstructorDescriptionMetricsWebClientCustomizer
(io.micrometer.core.instrument.MeterRegistry meterRegistry, WebClientExchangeTagsProvider tagProvider, String metricName, AutoTimer autoTimer) Create a newMetricsWebClientFilterFunction
that will record metrics using the givenmeterRegistry
with tags provided by the giventagProvider
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(WebClient.Builder webClientBuilder) Callback to customize aWebClient.Builder
instance.
-
Constructor Details
-
MetricsWebClientCustomizer
public MetricsWebClientCustomizer(io.micrometer.core.instrument.MeterRegistry meterRegistry, WebClientExchangeTagsProvider tagProvider, String metricName, AutoTimer autoTimer) Create a newMetricsWebClientFilterFunction
that will record metrics using the givenmeterRegistry
with tags provided by the giventagProvider
.- Parameters:
meterRegistry
- the meter registrytagProvider
- the tag providermetricName
- the name of the recorded metricautoTimer
- the auto-timers to apply ornull
to disable auto-timing- Since:
- 2.2.0
-
-
Method Details
-
customize
Description copied from interface:WebClientCustomizer
Callback to customize aWebClient.Builder
instance.- Specified by:
customize
in interfaceWebClientCustomizer
- Parameters:
webClientBuilder
- the client builder to customize
-