Class ObservationRestTemplateCustomizer
java.lang.Object
org.springframework.boot.actuate.metrics.web.client.ObservationRestTemplateCustomizer
- All Implemented Interfaces:
RestTemplateCustomizer
RestTemplateCustomizer
that configures the RestTemplate
to record
request observations.- Since:
- 3.0.0
- Author:
- Brian Clozel
-
Constructor Summary
ConstructorDescriptionObservationRestTemplateCustomizer
(io.micrometer.observation.ObservationRegistry observationRegistry, ClientRequestObservationConvention observationConvention) Create a newObservationRestTemplateCustomizer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(RestTemplate restTemplate) Callback to customize aRestTemplate
instance.
-
Constructor Details
-
ObservationRestTemplateCustomizer
public ObservationRestTemplateCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, ClientRequestObservationConvention observationConvention) Create a newObservationRestTemplateCustomizer
.- Parameters:
observationConvention
- the observation conventionobservationRegistry
- the observation registry
-
-
Method Details
-
customize
Description copied from interface:RestTemplateCustomizer
Callback to customize aRestTemplate
instance.- Specified by:
customize
in interfaceRestTemplateCustomizer
- Parameters:
restTemplate
- the template to customize
-