What does Claude Code's OpenTelemetry output contain?
Three separate signals, each with its own enable switch. Metrics are counters for tokens, cost, sessions, and lines of code. Log events are structured records for each prompt, API request, API error, and tool result. Traces, still in beta, are spans for each interaction, model request, tool call, and hook, nested so a subagent’s spans sit under the parent tool call that spawned it.
The trace spans are named claude_code.interaction, claude_code.llm_request, claude_code.tool, and claude_code.hook, Claude Code’s own names, not the OpenTelemetry GenAI convention’s gen_ai.* operation names. A backend built to read gen_ai.operation.name or gen_ai.provider.name won’t recognize any of them without a mapping step first. Metrics and log events are the settled part of this output; traces can still change span names and attributes between releases. Content itself, prompt text and tool arguments, stays out of all three signals unless you opt in variable by variable, the same content-leaves-the-agent decision every instrumentation layer has to make.