A conceptual view of Claude API tracing: related spans connect an application to monitoring, with metadata export by default and content export as an optional branch. Span widths do not represent measured latency. Illustration: MacDigest.
Anthropic launched OpenTelemetry export in beta on October 14 for Messages API requests and Claude Managed Agents sessions. For teams whose Mac or iPhone apps use a Claude-powered backend, the practical benefit is following a slow interaction through that service.
A span records one step in a request, such as a model call or tool use. SDK tracing captures client-side work; API tracing adds server-side detail. Together, they can help locate delays.
Check what the monitoring service receives
Metadata only is the default for SDK clients and API destinations. It includes timing, status, identifiers and token counts, plus developer-supplied text such as agent and tool names and descriptions. Review those fields too: metadata can still reveal information about your application. Keep personal data and secrets out of SDK conversation IDs, which are exported in both modes.
Full content can include prompts and responses. The receiving monitoring service stores exported data under its own retention and access controls. Check those controls before enabling content capture, particularly when app users may submit private material.
Avoid inflated usage totals
The same tokens can appear in both SDK and API spans, and at multiple levels inside API traces. Anthropic’s counting guide says to choose one source per request, favoring API spans when both exist. For Messages API usage, count request spans or their model-request spans, rather than both. Input-token totals already include prompt-cache reads and writes. Compaction and Managed Agents have additional counting rules.
Repeated deliveries also need deduplication by trace ID and span ID. API export is best effort: spans can be lost. On Claude Platform, use the Usage API to check API-key usage, including requests absent from traces. Claude Platform on AWS lacks these programmatic endpoints; use the Console’s Usage and Cost pages instead.
Start with a narrow rollout
For API-side export, an organization administrator configures a destination in the Claude Console. The receiver must accept OTLP/HTTP protobuf over HTTPS on port 443. Begin with selected workspaces and metadata-only capture, send the documented test span, then verify a real request appears in the monitoring service.
SDK tracing requires a registered tracer provider. Pin the SDK version: beta options and span schemas can change, breaking dashboards or queries. On Claude Platform on AWS, API spans currently start separate traces because that API does not yet support the incoming traceparent header.
Claude Code and the Agent SDK have separate monitoring setups. MacDigest has not independently tested this beta.
