Auto-configuration ignores user-provided ObservationConventions
See original GitHub issueWith the move to micrometer observability, the WebClientExchangeTagsProvider and RestTemplateExchangeTagsProvicer have both been deprecated in favour of ObservationConventions.
The configuration (in this case the reactive but also affects the servlet) is not customizable enough to allow users to move off the deprecated classes.
The configuration should have means to accept a custom implementation of the ObservationConvention. Right now you would have to exclude this configuration class completely as the default convention is created in the bean method. See here:
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/observation/web/client/WebClientObservationConfiguration.java#L53
Additional Context
I would like to migrate away from deprecated classes, but without being able to create my own ObservationConvention I cannot cleanly stop using the old TagsProvider’s.
cc @bclozel excuse the tag, but mentioned as you created these configuration classes
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (5 by maintainers)

Top Related StackOverflow Question
Thanks @braunsonm - we’ve discussed this with @marcingrzejszczak and found that the current situation is not in line with the migration story we’re expecting. I’m repurposing this issue to use
ObservationConventionbeans provided by the application as a way to customize key values. I’ve also updated the migration guide accordingly. You can test this approach with3.0.0-SNAPSHOTas soon as this issue is resolved.We’ve also addressed this in the reference documentation in #33281