Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultServerRequestObservationConvention is silently used when multiple convention beans are defined #31864

Closed
breun opened this issue Dec 15, 2023 · 2 comments
Assignees
Labels
theme: observability An issue related to observability and tracing type: bug A general bug
Milestone

Comments

@breun
Copy link

breun commented Dec 15, 2023

With Spring Boot 3.1.6, a Spring WebFlux application with Micrometer Observation would fail to start when multiple beans of type ServerRequestObservationConvention are defined, which I consider expected behavior. However, with Spring Boot 3.2.0 this behavior changed, and now you don't get a startup failure when multiple ServerRequestObservationConvention beans are defined, but silently DefaultServerRequestObservationConvention is used. I think this is unexpected and confusing behavior.

I've created https://github.com/breun/spring-boot-reactive-observation-convention-issue to illustrate this issue. See the tests on the spring-boot-3.1 and spring-boot-3.2 branches of this project.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 15, 2023
@scottfrederick
Copy link
Contributor

The reason that you're no longer getting the exception when multiple ServerRequestObservationConvention beans are created is that the WebFlux observation auto-configuration no longer uses beans of this type. See spring-projects/spring-boot#37344 for the background on this change. This is not currently mentioned in the 3.2 release notes, so we should add something there.

@scottfrederick scottfrederick added type: wiki-documentation A documentation update required on the wiki and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 18, 2023
@bclozel bclozel transferred this issue from spring-projects/spring-boot Dec 19, 2023
@bclozel bclozel added type: bug A general bug theme: observability An issue related to observability and tracing and removed type: wiki-documentation A documentation update required on the wiki labels Dec 19, 2023
@bclozel bclozel added this to the 6.1.3 milestone Dec 19, 2023
@bclozel bclozel changed the title DefaultServerRequestObservationConvention is silently used when multiple ServerRequestObservationConvention beans are defined in a Spring Boot 3.2.0 WebFlux application DefaultServerRequestObservationConvention is silently used when multiple convention beans are defined Dec 19, 2023
@bclozel
Copy link
Member

bclozel commented Dec 19, 2023

We'll align the Framework behavior with the previous Spring Boot setup.

@bclozel bclozel self-assigned this Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: observability An issue related to observability and tracing type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants