question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-configuration ignores user-provided ObservationConventions

See original GitHub issue

With 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:closed
  • Created 10 months ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bclozelcommented, Nov 22, 2022

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 ObservationConvention beans provided by the application as a way to customize key values. I’ve also updated the migration guide accordingly. You can test this approach with 3.0.0-SNAPSHOT as soon as this issue is resolved.

1reaction
bclozelcommented, Nov 21, 2022

We’ve also addressed this in the reference documentation in #33281

Read more comments on GitHub >

github_iconTop Results From Across the Web

41. Testing - Spring
Spring Boot provides a number of utilities and annotations to help when testing your application. Test support is provided by two modules; spring-boot-test ......
Read more >
Spring Boot Auto Configuration - JAX London 2022
An ImportSelector can programmatically decide which Spring configurations should be added to the application context. This mechanism is used for ...
Read more >
Manual Instrumentation | OpenTelemetry
The first step is to get a handle to an instance of the OpenTelemetry interface. If you are an application developer, you need...
Read more >
Start the Elastic Stack with security enabled automatically
These tools are available in the Elasticsearch bin directory. ... The issuer should be Elasticsearch security auto-configuration HTTP CA .
Read more >
Quick Guide to Micrometer - Baeldung
Micrometer provides a simple facade over the instrumentation ... we should use a MeterRegistry explicitly designed for our monitoring system ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found