The Claude API can now send OpenTelemetry traces of Messages API requests and Claude Managed Agents sessions to your observability platform, in beta. The first decision is the content mode: metadata only, or full prompts and responses. After that, choose which workspaces each destination covers and how you count tokens without double counting.
What was released
OpenTelemetry export was announced by Anthropic on 14 October 2026 in the Claude API release notes. It traces Messages API requests and Claude Managed Agents sessions as standard OpenTelemetry spans, using the GenAI semantic conventions, so platforms that already understand those conventions can read them without extra setup. The Claude SDK emits spans in Python, TypeScript, C#, Go, Java, PHP and Ruby. Spans from the API itself need a destination added in the Claude Console, as the OpenTelemetry overview explains. The feature is in beta on the Claude API and on Claude Platform on AWS.
What actually changed
- Two sources of spans. SDK tracing is set up in code, needs no special permission and covers clients that use the SDK, including client tools run by the tool runner. API tracing is set up in the Console, needs the admin role and covers any client, adding a span for each model run inside a request, each Managed Agents turn and each server tool the API runs. Anthropic suggests using both, so a request's SDK and API spans sit in one trace.
- Destinations are OTLP over HTTPS. A destination is an OTLP/HTTP endpoint that accepts protobuf on port 443, with credentials sent as request headers. Destinations can also be created through the Admin API under the
telemetry-destinations-2026-08-11beta header, according to the API tracing guide. - Two content modes. Metadata only, the default, sends identifiers, timing, status, token counts and the names of your agents, tools and MCP servers. Full content adds the system prompt, the messages and the model's responses. Organisations with a HIPAA, FERPA or K-12 data-handling restriction with Anthropic get metadata only from destinations whatever the setting.
- Per-workspace scope. Each destination covers all workspaces, selected workspaces or all except some, and the API sends spans to every enabled destination that covers the workspace where a request runs. The published limits are 10 destinations per organisation and 1,000 selected workspaces per destination.
- Trace context flows both ways. The API reads the W3C
traceparentheader, so its spans nest under your own. It also passes atraceparentto MCP servers connected through the MCP connector, so they can add their own spans underneath. Claude Platform on AWS does not read the header yet. - Delivery is not guaranteed. Spans are delivered at least once but can still be lost, and a destination is disabled if it returns a redirect, resolves to a non-public address or fails every delivery for 24 hours.
The choices to make before you switch it on
In CodeDTX's view, these are the decisions that need an owner before the first span leaves Anthropic:
- Choose the content mode per destination, not per company. Full content is what makes traces useful for debugging a bad answer and building evals from real traffic. It also copies prompts, which may hold customer data, into a second system under that platform's own access and retention rules. Start with metadata only for the general operations platform, and send full content only to a restricted destination with a retention policy you have agreed. Our guide to keeping personal data out of AI agent logs covers what to check.
- Map workspaces to environments. Because a destination is scoped by workspace, keep production and test traffic in separate workspaces and send them to separate destinations. Use Selected rather than All for full content, so a new workspace does not start exporting prompts by default.
- Count tokens once. Usage appears on several spans of the same request. Anthropic's token counting rules say to sum only one source per request, tell SDK and API spans apart by span kind, and remove duplicate deliveries by trace ID and span ID. Get this wrong and a cost dashboard can report spend that never happened, which undermines the work in controlling what an AI agent costs to run.
- Do not treat spans as your billing or security record. Delivery is not guaranteed, and a caller can drop its own spans by turning off the sampled flag in
traceparent. For per-key usage, such as spotting a leaked key, Anthropic points to the Usage API instead. For accountability, keep the records described in what an AI agent audit trail contains separately. - Size the content limit. With full content, each span is cut to a default size and marked with
anthropic.content.truncated, dropping the system prompt and earliest messages first. If your platform accepts larger payloads, raise the limit so long agent sessions arrive whole; if a proxy rejects large requests, lower it.
When not to rely on it yet
OpenTelemetry export is a beta feature under Anthropic's beta terms, so treat field names and limits as subject to change and keep dashboards that depend on them easy to update. Teams on Bedrock or Vertex AI do not get API spans, since API tracing supports only the Claude Platform and Claude Platform on AWS; there, SDK tracing is the option. Claude Managed Agents is not eligible for zero data retention, so full content for agent sessions adds a copy of data that already lives with Anthropic. For the wider monitoring picture, see how to monitor an AI agent in production.
Frequently asked questions
What does Claude API OpenTelemetry export do?
It sends OpenTelemetry traces of your Claude Messages API requests and Claude Managed Agents sessions to an observability platform you choose, such as Datadog, Grafana Cloud, Honeycomb or Langfuse. Spans cover model requests, tool uses and agent turns, with timing, status and token counts. Anthropic launched it in beta on 14 October 2026, and API spans are set up by adding a destination in the Claude Console.
What is the difference between metadata only and full content?
Metadata only is the default. Spans carry identifiers, timing, status, token counts and names you chose, such as agent, tool and MCP server names. Full content also includes the system prompt, input messages and model responses, which helps debugging and building evals but places prompt data in your observability platform. Organisations with HIPAA, FERPA or K-12 data-handling restrictions receive metadata only from API destinations.
Do I need the Claude SDK to get traces?
No. API tracing works for any client once an admin adds a destination in the Claude Console, and it covers model runs, Managed Agents turns and server tools. SDK tracing adds spans that only the client can see, such as client tools run by the tool runner and other API calls like file uploads. Using both lets you see a request's client and server spans together in one trace.
Can I use exported spans to track Claude API spend?
They help, but they are not a complete record. Delivery is not guaranteed, so a span can be lost, and a caller can leave spans out by turning off the sampled flag. Spans can also arrive more than once, so remove duplicates by trace ID and span ID. For an authoritative view of usage per API key, Anthropic recommends its Usage API, which also counts requests that produced no spans.



