Skip to content

WebFlux can fail to start without spring-boot-micrometer-metrics - #53042

Open
beyondwin wants to merge 1 commit into
spring-projects:4.0.xfrom
beyondwin:webflux-observation-without-metrics
Open

beyondwin wants to merge 1 commit into
spring-projects:4.0.xfrom
beyondwin:webflux-observation-without-metrics

Conversation

@beyondwin

Copy link
Copy Markdown
Contributor

Split out of #53038 as requested.

A Spring Boot 4.0.10 WebFlux application using spring-boot-starter-zipkin that defines its own MeterRegistry bean fails to start without spring-boot-micrometer-metrics. WebFlux's observation auto-configuration declares its URI tag filter, which takes MetricsProperties, on the outer class, so the class cannot be introspected when the metrics module is missing. gh-48581 fixed the same problem for Spring MVC.

Move the URI tag filter into a nested configuration that requires the metrics module, as Spring MVC does, so the observation convention can still be registered without it. When the Boot observation module is absent and the application supplies its own ObservationRegistry and MeterRegistry, the auto-configuration now backs off instead of failing.

Isolate the URI tag filter so that registering the WebFlux observation
convention does not require Boot's metrics module. Back off when Boot's
observation module is unavailable.

Signed-off-by: WooSeung Kim <wooseung.dev@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue that has not yet been triaged. Contributions will not be accepted. label Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue that has not yet been triaged. Contributions will not be accepted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants