Claude Platform adds OpenTelemetry tracing for the Messages API
Claude Platform now exports OpenTelemetry traces from the Messages API, Managed Agents and SDKs in public beta. Metadata is included by default; full-content exports also include prompts, responses and tool content.

TL;DR
- Native OpenTelemetry export is in public beta across the Messages API, Managed Agents and Claude SDKs, as Anthropic announced.
- API exports need no application-code changes, according to WesRoth; SDK tracing requires separate setup.
- Metadata is the default; Anthropic says full-content exports also include prompts, responses, tool inputs and tool results.
- Existing observability stacks can receive the traces: testingcatalog demonstrated Grafana, while LangChain announced LangSmith support.
Server-side spans are the prize in the coverage docs: individual model runs and server tools become visible inside a single API request. The SDK docs also reveal a useful timing detail: a streaming request's span stays open until the application finishes reading or closes the stream.
Server-side and SDK spans
Anthropic opened the beta on October 14 through its launch announcement. The API and SDK emit different parts of the execution tree:
- API tracing: individual model runs, Managed Agents turns, and tools executed by the API.
- SDK tracing: client requests, tools executed by the tool runner, tools in self-hosted sandboxes, and other API operations such as file uploads.
- Both together: client-side and server-side activity linked into one trace, with an AWS exception described below.
Spans follow OpenTelemetry's GenAI semantic conventions, allowing compatible backends to recognize model and tool activity without a Claude-specific adapter.
Console destinations
An organization admin can add and change export destinations in Claude Console; developers can view them. The API configuration guide specifies several concrete mechanics:
- Transport: OTLP/HTTP with protobuf encoding, delivered to an HTTPS hostname on port 443. A collector's default port 4318 does not satisfy that endpoint requirement.
- URL handling: Anthropic appends
/v1/tracesto the base endpoint unless a separate traces endpoint is configured. - Workspace routing: a destination can receive All workspaces, Selected workspaces, or All except specified workspaces. Matching spans go to every enabled destination covering that workspace.
- Delivery checks: the Console's Test action emits an
anthropic.testspan. Production API spans carryservice.name=claude-platform, and the Console reports destination health.
Trace context and session IDs
SDK tracing uses the application's registered tracer provider and exporter, leaving ordinary SDK method calls unchanged. When a call runs inside an active application span, W3C traceparent propagation connects the hierarchy:
application span → SDK CLIENT span → API SERVER span
The spans need to reach the same observability platform to appear together. Claude Platform on AWS does not yet support this header, so its API spans start separate traces even when SDK tracing is enabled.
Managed Agents sessions can also cross trace boundaries as later requests arrive. Anthropic's tracing documentation defines two grouping keys:
gen_ai.conversation.id: one session thread.anthropic.session.id: the whole session, including its threads across traces.
Metadata and full content
Content mode is configured independently for each export destination and SDK client:
- Metadata only, the default: identifiers, timing, status, token counts, model and tool names, plus user-chosen text such as agent descriptions and MCP server names.
- Full content: the metadata above, plus prompts, responses, tool arguments and tool results.
Metadata mode still exports those user-chosen names and descriptions. The receiving observability platform stores exported data under its own retention and access controls, as the content-mode documentation explains.
Full-content export is compatible with Messages API zero data retention: Anthropic holds exported content in memory until delivery. Managed Agents is not eligible for zero data retention, and enabling tracing does not change its retention.
Organizations with HIPAA, FERPA or K-12 data-handling restrictions export only metadata from destinations regardless of their selected mode. That restriction does not apply to SDK spans.
Content limits
Full-content spans default to a 0.75 MB content ceiling, which Anthropic sizes for roughly 200,000 tokens of English text. According to Anthropic's documentation, content exceeding the limit is shortened with specific rules:
- Request spans drop the system prompt and earliest messages first.
- Tool spans drop blocks from the end of the result.
- Images and documents appear only as their type.
- Shortened spans carry
anthropic.content.truncated=true.
The SDK exposes traces.max_content_bytes; the Console exposes Maximum content size under Advanced settings. Listed partner destinations receive a provider-specific limit, and Anthropic estimates that a full million-token context needs about 4 MB.
LangSmith, Braintrust and Arize
LangSmith accepts both server-side Console exports and SDK-generated OpenTelemetry spans, with separate configuration paths in its integration guide. Arize AX and Phoenix are also supported, according to a collaborator on the integration.
Braintrust's native export receives server-side work without requiring the Braintrust SDK, including model requests, server tools and compaction. Anthropic also supports custom OTLP destinations, so the integration surface extends beyond the named partners.
Token counting and delivery
Braintrust's integration documentation warns that Messages API trace totals can count the same tokens twice: once on the API request span and again on its model-request spans. SDK spans sent to the same project can report those tokens again.
Anthropic's counting rules distinguish the accounting paths:
- Messages API: count API
anthropic.messages.createspans or theiranthropic.model_requestspans, never both. Compaction spans contribute additional usage once. - Managed Agents: count
anthropic.model_requestandanthropic.session.outcome_evaluationspans. - Prompt caching:
gen_ai.usage.input_tokensalready includes cache reads and writes; adding cache attributes inflates the total. - Retries: duplicate deliveries can occur. Trace ID plus span ID identifies a unique span.
Delivery is best effort, so spans can be lost. Outside the AWS exception, callers can also suppress API spans through an unsampled traceparent header. Anthropic identifies the Usage API as the source for per-key usage accounting that includes requests without exported spans.