Observability Services
Spring Boot auto-configuration bundling the Camel observability services: metrics, tracing and health.
The starter pulls in camel-micrometer, micrometer-registry-prometheus, camel-opentelemetry2 and camel-management, and contributes a set of defaults so that a Camel application exposes a Prometheus scrape endpoint and Kubernetes-shaped liveness and readiness probes without any configuration.
The defaults are registered as the lowest precedence property source, so anything you set in application.properties, in an environment variable or on the command line overrides them.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-observability-services-starter</artifactId>
</dependency> Usage
Add the starter to the classpath and the endpoints below are available on a separate management listener, bound to loopback on port 9876:
| Endpoint | Purpose |
|---|---|
Aggregate health | |
Kubernetes liveness probe | |
Kubernetes readiness probe | |
Prometheus scrape endpoint |
Injected defaults
This is the full set of properties the starter contributes. Every one of them can be overridden by your own configuration:
| Property | Value | Notes |
|---|---|---|
|
| Management endpoints run on their own listener, separate from the application port. |
|
| The listener binds to loopback. See Exposing the management listener. |
|
| Only these two endpoints are exposed. |
|
| Replaces the |
|
| Serves the Prometheus endpoint at |
|
| Dumps a metrics summary to the log when the application stops. |
|
| Which metrics that summary contains. |
|
| Format of that summary. |
|
| Enables the OpenTelemetry tracing instrumentation. |
|
| Enables the liveness and readiness health groups. |
|
| Registers the |
|
| Registers the |
|
| |
|
| Contents of |
|
| |
|
| Contents of |
|
|
Exposing the management listener
The management listener binds to 127.0.0.1, so out of the box the health and metrics endpoints are reachable from the same host only. This matches the Spring Boot baseline, which ships no separate management listener at all: opening one on every interface should be a decision you make, not one the starter makes for you.
A Kubernetes deployment whose kubelet probes or Prometheus scrapers reach the pod over the network has to widen the bind address:
management.server.address = 0.0.0.0 Pair that with a NetworkPolicy, or with authentication in front of the management port, so the endpoints are only reachable from your probes and your scrapers.
Health detail exposure
/observe/health uses when-authorized, the setting that shows the individual health indicators to an authenticated caller and the overall status alone to everybody else. Camel health checks report on the resources a route talks to — broker connections, data sources, remote endpoints — and their detail can identify those resources, so it is not something to hand to an unauthenticated caller. With no Spring Security on the classpath there is no authenticated caller, and the endpoint behaves as never.
To restore the previous behaviour of showing the details to anyone who asks:
management.endpoint.health.show-details = always The live and ready groups keep always. The kubelet reaches them unauthenticated, and it puts the response body into the probe-failure event, so kubectl describe pod names the indicator that took the pod down. Both groups contain availability-state indicators only — livenessState, readinessState and their Camel counterparts report a status and carry no data — so there is nothing in those responses beyond the indicator names and their state.
Camel health exposure level
camel.health.exposure-level is left at its Camel default of default, which filters health check metadata — endpoint URIs, route and consumer identifiers — out of the health response while keeping the check names, error messages and stack traces that tell you what failed.
If you want the metadata as well, opt in:
camel.health.exposure-level = full