Is your feature request related to a problem? Please describe.
When using Spring Cloud Config Client in a Spring Boot application, it's not possible to monitor the behavior of the integration with the Config Server because the RestTemplate
instance used in ConfigServerConfigDataLoader
is not instrumented with metrics nor observations using Micrometer.
Describe the solution you'd like
I would like for the RestTemplate
instance used in ConfigServerConfigDataLoader
to be instrumented to export metrics and traces. At least, I would like a hook I can use to provide the instrumentation myself.
Describe alternatives you've considered
I tried customizing the RestTemplate
instance used in ConfigServerConfigDataLoader
as documented in https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_providing_a_custom_resttemplate_using_config_data. However, it cannot be configured with the same ObservationRestTemplateCustomizer
used for the general RestTemplate
configured by Spring Boot because I can't get a hold of the ObservationRegistry
bean which is configured by Spring Boot at a later point.
Additional context Besides normal production observability needs, having this instrumentation would be beneficial to understand the bahavior of the Spring Cloud Config Client library, especially when it comes to retries.