Skip to content

Jersey can fail to start without spring-boot-micrometer-metrics - #53038

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

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

Conversation

@beyondwin

@beyondwin beyondwin commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

A Spring Boot 4.0.10 Jersey application using spring-boot-starter-zipkin and jersey-micrometer fails to start without spring-boot-micrometer-metrics. Jersey's observation auto-configuration enables MetricsProperties for its URI tag filter on the outer class, so it fails when that class 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 Jersey observation listener can still be registered without it. When the Boot observation module is absent and the application supplies its own ObservationRegistry, the auto-configuration now backs off instead of failing.

@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 3, 2026
@wilkinsona

Copy link
Copy Markdown
Member

Thanks for the PR.

There are two separate problems here (one with Jersey and one with WebFlux) that should be addressed separately. Please update this PR to focus on either Jersey or WebFlux and open a second PR for the other.

Looking at the proposed tests, they're quite a bit more verbose than what was added in #48581. Please either explain why that's warranted or update them.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Dec 3, 2026
Isolate the URI tag filter so that registering the Jersey observation
listener 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>
@beyondwin
beyondwin force-pushed the jersey-observation-without-metrics branch from c033656 to b497124 Compare December 4, 2026 02:16
@beyondwin beyondwin changed the title Jersey and WebFlux can fail to start without spring-boot-micrometer-metrics Jersey can fail to start without spring-boot-micrometer-metrics Dec 4, 2026
@beyondwin

Copy link
Copy Markdown
Contributor Author

Thanks, Andy. I've narrowed this PR to Jersey and opened #53042 for WebFlux. The tests now follow gh-48581, with two FilteredClassLoader tests in the existing test class.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels 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: feedback-provided Feedback has been provided 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.

3 participants