We've launched OpenTelemetry export in beta
By Steven Van ·
SDK tracing supports Python, TypeScript, C#, Go, Java, PHP and Ruby, while admins configure API exports in the Claude Console.
Developers using Anthropic's Claude API can now trace Messages API requests, tool uses and Managed Agents sessions in their existing observability backend. The OpenTelemetry export beta supports debugging failed or slow requests, tracking token spend and latency, and building evals from real traffic.
Set up SDK tracing, API tracing or both
The Claude SDK emits spans in Python, TypeScript, C#, Go, Java, PHP and Ruby. SDK tracing requires installing the SDK and registering a tracer provider. API tracing requires an admin to add an OpenTelemetry destination in the Claude Console and covers requests from any client. Traces can go to any observability platform that accepts OTLP.
SDK tracing captures client tool execution, including tools run by the tool runner. API tracing adds individual model runs, Managed Agents turns and server tool execution. Setting up both puts SDK and API spans for a request into one trace. For requests to Claude Platform on AWS, API spans appear in separate traces.
Choose how much content to export
The default Metadata only mode includes identifiers, timing, status and token counts, plus selected text such as agent and tool names and descriptions. Full content adds model prompts and responses, allowing teams to read conversations and build evals from traces. Each destination and SDK client has its own content setting.
Exported content is stored under the observability platform's access and retention settings. For organizations with HIPAA, FERPA or K-12 data-handling restrictions with Anthropic, API destinations export metadata only regardless of the selected mode. SDK spans are unaffected.