[
https://issues.apache.org/jira/browse/CAMEL-23369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147769#comment-18147769
]
Federico Mariani commented on CAMEL-23369:
------------------------------------------
h3. Status, 19 Nov 2026
*Done*
* 4.23.0, mostly under CAMEL-23861 and its follow-ups:
{{camel-ai-observability}} (opt-in) records GenAI spans with the {{gen_ai.*}}
attributes and the Micrometer metrics {{gen_ai.client.operation}} (timer) and
{{gen_ai.client.token.usage}} (counter). It covers {{openai}} (chat-completion
with streaming, responses, embeddings, moderation; CAMEL-24559),
{{langchain4j-chat}}, {{langchain4j-agent}}, {{langchain4j-embeddings}} and
{{spring-ai-chat}}. Related: Micrometer Observation (CAMEL-24561), error
metadata (CAMEL-24551), Camel Main and Spring Boot options (CAMEL-24386,
CAMEL-24555), Camel CLI dependencies (CAMEL-24566).
* 4.24.0: the {{basic}} / {{detailed}} / {{full}} levels with agent runs, tool
calls and messages, and no double recording of the calls already traced by
Spring AI, quarkus-langchain4j or the OpenTelemetry Java agent (CAMEL-27131).
The implementation is found without reflection (CAMEL-27155). Spring Boot:
CAMEL-27132, CAMEL-27133, CAMEL-27134.
* Cached input tokens ({{gen_ai.usage.cache_read.input_tokens}}) for {{openai}}
chat-completion, at level {{detailed}}.
*Open*
* CAMEL-27142: {{openai}} responses at {{detailed}} and {{full}}. PR
https://github.com/apache/camel/pull/30326 needs a rebase, because #30339
removed {{GenAiObservation.makeCurrent()}}.
* CAMEL-27143: read the model name, provider and error status without
reflection (native images).
* CAMEL-27135: the camel-jbang views for {{detailed}} and {{full}}.
* Camel Quarkus extension: https://github.com/apache/camel-quarkus/issues/9518
(no PR yet).
* Related: CAMEL-27139 (span names), CAMEL-27140 (session and user ids on every
span).
*Not covered yet, no ticket*
* {{camel-aws-bedrock}}, {{camel-google-vertexai}} and
{{camel-ibm-watsonx-ai}}, listed in this issue, set the token counts as headers
({{CamelAwsBedrockConverseUsage}}, {{CamelGoogleVertexAIPromptTokenCount}} /
{{CandidatesTokenCount}}, {{CamelIBMWatsonxAiInputTokenCount}} /
{{OutputTokenCount}}) but record no GenAI span or metric. CAMEL-24559 proposed
them and was resolved with the {{openai}} operations only.
* Cache write and reasoning tokens are not recorded by any component. Cached
input tokens are recorded only by {{openai}} chat-completion, on the span, not
as a metric.
* The GenAI metrics go through Micrometer only: an application with
{{camel-opentelemetry-metrics}} and no Micrometer gets the GenAI spans but no
GenAI metrics.
* The GenAI conventions moved to
https://github.com/open-telemetry/semantic-conventions-genai (semconv 1.45.0).
That repository has no release yet, and its main branch renames metrics and
attributes, for example {{gen_ai.client.token.usage}} becomes
{{gen_ai.client.inference.usage.*}} counters, and {{cache_creation}} becomes
{{cache_write}}. Camel records {{gen_ai.system}}, deprecated in favour of
{{gen_ai.provider.name}}, at every level, and {{gen_ai.provider.name}} only
from {{detailed}}.
_Claude Code on behalf of Croway_
> Add OpenTelemetry GenAI observability (traces and metrics) for AI components
> ----------------------------------------------------------------------------
>
> Key: CAMEL-23369
> URL: https://issues.apache.org/jira/browse/CAMEL-23369
> Project: Camel
> Issue Type: Improvement
> Affects Versions: 4.20.0
> Reporter: Federico Mariani
> Priority: Major
>
> Currently none of the Camel AI components (camel-openai,
> camel-langchain4j-chat, camel-langchain4j-embeddings, camel-spring-ai-chat,
> camel-google-vertexai, camel-aws-bedrock, camel-ibm-watsonx-ai) are
> instrumented by the _camel-telemetry_ tracing framework or the metrics
> frameworks (camel-opentelemetry-metrics, camel-micrometer).
> Similarly, the existing EventNotifier-based metrics (exchange duration,
> in-flight gauges) don't capture AI-specific data like token counts.
>
>
>
> The https://opentelemetry.io/docs/specs/semconv/gen-ai/ define standard span
> attributes (gen_ai.operation.name, gen_ai.provider.name,
> gen_ai.request.model, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens,
> gen_ai.response.finish_reasons, etc.) and metrics (gen_ai.client.token.usage
> histogram, gen_ai.client.operation.duration histogram) for LLM operations.
> Camel AIs components already expose token counts and response metadata as
> Camel message headers, but this data does not flow into distributed traces or
> metrics.
> We might improve the current camel AI implementations, and expose all the
> important metrics if not already exposed (for example, cache read and cache
> write tokens)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)