You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
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 multipleServerRequestObservationConvention
beans are defined, but silentlyDefaultServerRequestObservationConvention
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
andspring-boot-3.2
branches of this project.The text was updated successfully, but these errors were encountered: