fix(observability): use Spring Boot 4 packages in ObservabilityAutoConfiguration afterName - #1850
Open
arimu1 wants to merge 1 commit into
Open
fix(observability): use Spring Boot 4 packages in ObservabilityAutoConfiguration afterName#1850arimu1 wants to merge 1 commit into
arimu1 wants to merge 1 commit into
Conversation
ObservabilityAutoConfiguration still pointed afterName at Boot 3 actuate.autoconfigure paths. Under Boot 4 those classes moved to spring-boot-micrometer-*, so ordering relative to Boot observation and tracing autoconfig was silently dropped. Update afterName to the Boot 4 FQCNs and pin them with a unit test. Fixes embabel#1808 Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ObservabilityAutoConfigurationordered itself after Spring Boot observation/tracing viaafterNamestrings that still pointed at Boot 3org.springframework.boot.actuate.autoconfigure.*paths.On Spring Boot 4 those classes live under
org.springframework.boot.micrometer.*. Boot silently ignores unknownafterNameentries, so the ordering guarantee against Boot's observation/tracing autoconfiguration was lost (no compile/runtime failure).Changes
afterNameto:org.springframework.boot.micrometer.tracing.autoconfigure.MicrometerTracingAutoConfigurationorg.springframework.boot.micrometer.observation.autoconfigure.ObservationAutoConfigurationFixes #1808
Test plan
mvn -pl embabel-agent-autoconfigure/embabel-agent-observability-autoconfigure -am test -Dtest=ObservabilityAutoConfigurationTest -Dsurefire.failIfNoSpecifiedTests=false(JDK 21) — 29/29 greenAI disclosure
Human-reviewed fix. Implementation assisted by AI (Grok / Cursor implementator wave). Author: arimu1.