A follow-up to #1445 (Anthropic cache tokens), from the same 30-project conformance audit.
The observation
AgentOps uses the older GenAI semconv attribute names in agentops/semconv/span_attributes.py (~L61-63):
LLM_USAGE_PROMPT_TOKENS = "gen_ai.usage.prompt_tokens"
LLM_USAGE_COMPLETION_TOKENS = "gen_ai.usage.completion_tokens"
The current OTel GenAI semantic conventions use gen_ai.usage.input_tokens / gen_ai.usage.output_tokens. OpenLLMetry, pydantic-ai, and other instrumentation we audited have already migrated to the new names.
The file header (~L8-24) contains TODO comments acknowledging mapping issues.
The consequence
In an OTLP collector receiving spans from multiple SDKs:
sum(gen_ai.usage.input_tokens) misses all AgentOps spans (they emit prompt_tokens)
sum(gen_ai.usage.prompt_tokens) misses all OpenLLMetry spans (they emit input_tokens)
- Cross-SDK token aggregation requires knowing which attribute name each SDK uses — per-SDK knowledge that generic consumers shouldn't need
The question
Is there a plan to migrate to the current gen_ai.usage.input_tokens / output_tokens names, or to emit both during a transition? The old names still work within the AgentOps ecosystem, but any downstream tool consuming generic OTel GenAI attributes will silently undercount when AgentOps spans are mixed in.
Happy to send a two-SDK repro (one AgentOps span + one OpenLLMetry span in the same collector, asserting the aggregation gap).
Context: AgentMeasure conformance check; this is the AgentOps follow-up after the Anthropic cache-token finding in #1445.
A follow-up to #1445 (Anthropic cache tokens), from the same 30-project conformance audit.
The observation
AgentOps uses the older GenAI semconv attribute names in
agentops/semconv/span_attributes.py(~L61-63):The current OTel GenAI semantic conventions use
gen_ai.usage.input_tokens/gen_ai.usage.output_tokens. OpenLLMetry, pydantic-ai, and other instrumentation we audited have already migrated to the new names.The file header (~L8-24) contains TODO comments acknowledging mapping issues.
The consequence
In an OTLP collector receiving spans from multiple SDKs:
sum(gen_ai.usage.input_tokens)misses all AgentOps spans (they emitprompt_tokens)sum(gen_ai.usage.prompt_tokens)misses all OpenLLMetry spans (they emitinput_tokens)The question
Is there a plan to migrate to the current
gen_ai.usage.input_tokens/output_tokensnames, or to emit both during a transition? The old names still work within the AgentOps ecosystem, but any downstream tool consuming generic OTel GenAI attributes will silently undercount when AgentOps spans are mixed in.Happy to send a two-SDK repro (one AgentOps span + one OpenLLMetry span in the same collector, asserting the aggregation gap).
Context: AgentMeasure conformance check; this is the AgentOps follow-up after the Anthropic cache-token finding in #1445.