Class ObservationWebClientCustomizer
java.lang.Object
org.springframework.boot.webclient.observation.ObservationWebClientCustomizer
- All Implemented Interfaces:
WebClientCustomizer
WebClientCustomizer that configures the WebClient to record request
observations.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionObservationWebClientCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.web.reactive.function.client.ClientRequestObservationConvention observationConvention) Create a newObservationWebClientCustomizerthat will configure theObservationsetup on the client. -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder) Callback to customize aWebClient.Builderinstance.
-
Constructor Details
-
ObservationWebClientCustomizer
public ObservationWebClientCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.web.reactive.function.client.ClientRequestObservationConvention observationConvention) Create a newObservationWebClientCustomizerthat will configure theObservationsetup on the client.- Parameters:
observationRegistry- the registry to publish observations toobservationConvention- the convention to use to populate observations
-
-
Method Details
-
customize
public void customize(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder) Description copied from interface:WebClientCustomizerCallback to customize aWebClient.Builderinstance.- Specified by:
customizein interfaceWebClientCustomizer- Parameters:
webClientBuilder- the client builder to customize
-