CAMEL-24498: align camel-observability-services-starter defaults with the Spring Boot baseline - #1927
Open
Croway wants to merge 1 commit into
Open
CAMEL-24498: align camel-observability-services-starter defaults with the Spring Boot baseline#1927Croway wants to merge 1 commit into
Croway wants to merge 1 commit into
Conversation
… the Spring Boot baseline ObservabilityServicesEnvironmentPostProcessor injects a set of management defaults as soon as the starter is on the classpath. Three of them were wider than the Spring Boot or Camel setting they replaced: - management.server.port was injected with no matching management.server.address, so adding the starter opened a second listener on every interface. Spring Boot ships no separate management listener at all. The listener now binds to 127.0.0.1, the same choice camel-jolokia-starter makes for its agent. - management.endpoint.health.show-details was 'always' where the Spring Boot default is 'never'. The aggregate /observe/health endpoint now uses 'when-authorized'. Camel health checks report on the resources a route talks to and their detail can identify those resources. - camel.health.exposure-level was forced to 'full' where the Camel default is 'default'. It is no longer injected; 'full' is documented as an opt-in. The live and ready health groups keep show-details=always. The kubelet reads them unauthenticated and puts the response body into the probe-failure event, so 'kubectl describe pod' still names the indicator that took the pod down, and both groups contain availability-state indicators only - livenessState, readinessState and their Camel counterparts report a status and carry no data. The property source is still added with addLast, so all of these remain overridable by ordinary application configuration. Kubernetes deployments whose probes or scrapers reach the pod over the network now have to set management.server.address=0.0.0.0 explicitly. Adds starter docs (src/main/doc/intro.adoc and usage.adoc) documenting the full injected property set and how to opt back into each of the previous values, and regenerates the starter doc page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Croway
force-pushed
the
CAMEL-24498-observability-defaults
branch
from
September 2, 2026 13:11
b43fab0 to
2140eae
Compare
oscerd
approved these changes
Sep 2, 2026
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.
Fixes CAMEL-24498.
What
ObservabilityServicesEnvironmentPostProcessorinjects a set of management defaults as soon ascamel-observability-services-starteris on the classpath. Three of them were wider than the Spring Boot or Camel setting they replaced, and this PR brings them back in line.management.server.address127.0.0.1management.endpoint.health.show-detailsalwayswhen-authorizedcamel.health.exposure-levelfulldefault)Everything else the starter injects is unchanged.
Why
management.server.portwas injected with no matchingmanagement.server.address. Spring Boot ships no separate management listener at all, so the starter both opens the listener and, implicitly, put it on every interface. Opening it is the starter's job; deciding how far it reaches should be the operator's.camel-jolokia-starterbinds its agent to loopback for the same reason.show-details=alwaysis two steps past the Spring Boot default ofnever. Camel health checks report on the resources a route talks to — broker connections, data sources, remote endpoints — and their detail can identify those resources.when-authorizedshows the indicators to an authenticated caller and the overall status alone to everybody else; with no Spring Security on the classpath it behaves asnever.camel.health.exposure-level=fulloverrode the Camel default ofdefault. Atdefault,CamelHealthHelperfilters health check metadata (endpoint URIs, route and consumer identifiers) out of the response and keeps check names, error messages and stack traces — so failure diagnosis is unaffected.fullis now documented as an opt-in.Why the
live/readygroups keepshow-details=alwaysThe JIRA left this conditional on whether the Kubernetes probe flow needs it. It does, and it costs nothing:
/observe/health/liveand/observe/health/readyunauthenticated, sowhen-authorizedwould collapse toneverfor them.kubectl describe podnames the indicator that took the pod down. Withneverthe operator only sees the status code.CamelLivenessStateHealthIndicator/CamelReadinessStateHealthIndicatorextend Spring'sLivenessStateHealthIndicator/ReadinessStateHealthIndicator, which report a status and contribute no details. Soalwayson those groups reveals the indicator names and their UP/DOWN state, and nothing else.Behaviour change and how to opt back in
The property source is still added with
addLast, so every one of these is overridden by ordinary application configuration.Kubernetes deployments whose kubelet probes or Prometheus scrapers reach the pod over the network must now widen the bind address explicitly:
management.server.address = 0.0.0.0The other two:
This is called out in the starter docs and needs a note in the 4.23 upgrade guide in
apache/camel(drafted separately, not part of this PR).Docs
The starter had no hand-written doc sections. This PR adds
src/main/doc/intro.adocandsrc/main/doc/usage.adoc, which the generator folds intodocs/spring-boot/modules/ROOT/pages/starters/observability-services.adoc(regenerated and committed). They document the endpoint layout, the full injected property set as a table, and a section each on the bind address, health detail exposure and the Camel exposure level.A test asserts that the injected key set matches the documented table, so the two cannot drift apart silently.
Tests
mvn install -pl components-starter/camel-observability-services-starter— 10 tests, 0 failures.ObservabilityServicesEnvironmentPostProcessorTest(7) — extended withmanagementListenerBindsToLoopback,aggregateHealthDetailsRequireAuthorization,probeGroupsKeepTheirDetails,camelHealthExposureLevelIsNotForcedandinjectedPropertiesAreTheDocumentedSet; the existing assertions for the removed/changed values were updated.ObservabilityServicesOptInOverridesTest(3, new) — verifies each of the three settings can be opted back into from application configuration.No
Thread.sleepintroduced; the tests are assertions over theEnvironment, so no waiting is involved.Claude Code (Opus 5) on behalf of Federico Mariani