Class ObservationRestTemplateCustomizer
java.lang.Object
org.springframework.boot.actuate.metrics.web.client.ObservationRestTemplateCustomizer
- All Implemented Interfaces:
org.springframework.boot.web.client.RestTemplateCustomizer
public class ObservationRestTemplateCustomizer
extends Object
implements org.springframework.boot.web.client.RestTemplateCustomizer
RestTemplateCustomizer
that configures the RestTemplate
to record
request observations.- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionObservationRestTemplateCustomizer
(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.http.client.observation.ClientRequestObservationConvention observationConvention) Create a newObservationRestTemplateCustomizer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(org.springframework.web.client.RestTemplate restTemplate)
-
Constructor Details
-
ObservationRestTemplateCustomizer
public ObservationRestTemplateCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.http.client.observation.ClientRequestObservationConvention observationConvention) Create a newObservationRestTemplateCustomizer
.- Parameters:
observationConvention
- the observation conventionobservationRegistry
- the observation registry
-
-
Method Details
-
customize
public void customize(org.springframework.web.client.RestTemplate restTemplate) - Specified by:
customize
in interfaceorg.springframework.boot.web.client.RestTemplateCustomizer
-