CAMEL-24025: ship observability-services defaults via EnvironmentPostProcessor#1847
Merged
Croway merged 1 commit intoJul 13, 2026
Conversation
…Processor Replace the packaged config/application.properties in camel-observability-services-starter with an EnvironmentPostProcessor that registers the same defaults as the lowest precedence property source. The packaged file was loaded from classpath:/config/ which silently overrode the user's own application.properties; with this change the defaults follow the standard Spring Boot precedence rules and can be overridden by any user-provided configuration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
davsclaus
approved these changes
Jul 12, 2026
davsclaus
left a comment
Contributor
There was a problem hiding this comment.
Great to spot this so we have good usability on SB
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.
Resolves CAMEL-24025
What
camel-observability-services-starterpackaged its opinionated defaults as a literalconfig/application.propertiesinside the starter jar. Spring Boot's config-data search givesclasspath:/config/application.propertieshigher precedence than the application's ownclasspath:/application.properties, so the starter defaults silently overrode user settings — customization was only possible via environment variables or system properties, and this limitation was even documented in the component docs (referencing spring-projects/spring-boot#24688).This PR replaces the packaged properties file with an
ObservabilityServicesEnvironmentPostProcessorregistered viaMETA-INF/spring.factories. It contributes the exact same defaults as aMapPropertySourceadded withaddLast(...)(running atOrdered.LOWEST_PRECEDENCE, i.e. afterConfigDataEnvironmentPostProcessor), so the defaults sit at the bottom of the environment and every user-provided source overrides them following standard Spring Boot precedence rules. This aligns the behaviour with the Camel Main and Quarkus variants ofcamel-observability-services.Behavioural change
Previously the packaged defaults won over the user's
application.properties; now the user's configuration wins. This is the intent of the ticket, but applications that set e.g.management.server.portand silently got9876anyway will now get their own value.Tests
New
ObservabilityServicesEnvironmentPostProcessorTest:defaultsAreApplied— all defaults resolve from the environment when not overriddenuserApplicationPropertiesOverrideDefaults— values from a regularapplication.propertieswin over the starter defaults (this assertion fails against the previous packaged-file mechanism)Follow-up
The WARNING in the
camel-observability-servicesdocs (apache/camel,observability-services.adoc) stating that customization is not available on Spring Boot becomes obsolete once this is merged — will follow up with a docs PR in apache/camel.This PR was generated by Claude Code on behalf of Federico Mariani
🤖 Generated with Claude Code