Apache Camel 4.23 turns LLM calls into operations data
Standard GenAI spans and model-tagged token metrics let integration teams trace latency and attribute consumption by route and model.
Apache Camel 4.23 adds a dedicated observability layer for AI calls inside integration routes, turning model latency and token use into standard operations data instead of leaving each LLM invocation as an opaque external request.
The live AI Observability module documentation, explicitly marked “Since Camel 4.23,” says camel-ai-observability follows the stable subset of OpenTelemetry’s GenAI semantic conventions. When a tracing or metrics backend is present, Camel’s LangChain4j, OpenAI and Spring AI chat producers can emit a child span and metrics for each model call.
What the telemetry exposes
Camel attaches attributes including the operation name, AI system, requested model, input-token count and output-token count. The supported producer set covers LangChain4j chat, agents and embeddings, plus OpenAI and Spring AI chat routes.
Metrics use two standard series: gen_ai.client.operation for operation duration and gen_ai.client.token.usage for token consumption. The token counter distinguishes input from output with a tag. For an integration team, that makes prompt growth, completion growth and model latency visible alongside the route that initiated the request.
The same dimensions also make model calls operationally distinguishable from generic HTTP dependencies. Teams can compare model latency, identify which routes are driving token consumption and connect an AI client span to the surrounding Camel trace without putting prompts or completions into telemetry keys.
How Camel wires it in
The module is enabled when it is on the application classpath with a supported tracing or metrics backend. Camel documents camel-opentelemetry2 and camel-micrometer as direct paths for spans and metrics, while a non-no-op Micrometer ObservationRegistry can record each call as a gen_ai.client.operation observation.
There is an important configuration distinction. An Observation registry only produces GenAI tracing if it has a tracing handler, and it only produces the operation timer if it has a meter handler. Token counters still use a MeterRegistry when one is present. Camel falls back to its direct OpenTelemetry and Micrometer behavior when no Observation registry is available.
Spring AI users should also provide the chat model explicitly on the endpoint or component. Camel can attempt to inspect the model behind a prebuilt chatClient, but the documentation warns that this relies on a private Spring AI field and may otherwise report the system or requested model as unknown.
What changes for operators
Camel’s terminal UI can combine token use from the embedded camel ask prompt with route-level GenAI use extracted from exported spans. That gives local developers one usage view for interactive prompts and integration-route calls.
The module documentation itself identifies the capability as available since Camel 4.23, so the version-specific claim no longer depends on the dead upgrade-guide page. Adoption still requires explicit telemetry dependencies and a correctly configured exporter or observation registry. The practical first step is to instrument one model-calling route, verify model and token attributes, then build latency and consumption alerts around the resulting standard signals.
sources
- Apache Camel AI Observability module documentationcamel.apache.org
comments · 0