[FEATURE] Claude Code telemetry should follow OpenTelemetry GenAI Semantic Conventions for Anthropic
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The telemetry currently emitted by Claude Code appears to use proprietary attributes rather than the standard OpenTelemetry GenAI semantic conventions.
This creates several challenges:
- Telemetry from Claude Code cannot be easily correlated with telemetry generated by other Anthropic integrations.
- Observability platforms must implement custom mappings and parsers.
- Dashboards and analytics cannot be reused across GenAI workloads.
- Organizations using multiple Anthropic-based applications lose consistency in monitoring, troubleshooting, and cost analysis.
Proposed Solution
Claude Code should emit OpenTelemetry traces, spans, metrics, and attributes that follow the GenAI Semantic Conventions specification whenever possible.
Examples include standard attributes such as:
gen_ai.systemgen_ai.operation.namegen_ai.request.modelgen_ai.response.modelgen_ai.usage.input_tokensgen_ai.usage.output_tokensgen_ai.request.temperatureserver.addresserror.type- ...
and any additional attributes defined by the Anthropic semantic convention specification.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Following the standard semantic conventions would provide several benefits:
- Improved interoperability with OpenTelemetry tooling.
- Easier integration with observability platforms.
- Consistent dashboards and reporting across Anthropic SDKs, APIs, and Claude Code.
- Reduced need for vendor-specific normalization logic.
- Better support for enterprise observability use cases.
- Future compatibility as the OpenTelemetry GenAI ecosystem continues to mature.
References
Thank you for considering this enhancement. Aligning Claude Code telemetry with OpenTelemetry GenAI semantic conventions would significantly improve interoperability and observability adoption across the ecosystem.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗