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

    Constructors
    Constructor
    Description
    ObservationRestTemplateCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.http.client.observation.ClientRequestObservationConvention observationConvention)
    Create a new ObservationRestTemplateCustomizer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(org.springframework.web.client.RestTemplate restTemplate)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ObservationRestTemplateCustomizer

      public ObservationRestTemplateCustomizer(io.micrometer.observation.ObservationRegistry observationRegistry, org.springframework.http.client.observation.ClientRequestObservationConvention observationConvention)
      Create a new ObservationRestTemplateCustomizer.
      Parameters:
      observationConvention - the observation convention
      observationRegistry - the observation registry
  • Method Details

    • customize

      public void customize(org.springframework.web.client.RestTemplate restTemplate)
      Specified by:
      customize in interface org.springframework.boot.web.client.RestTemplateCustomizer