Anthropic (Claude Platform) · 2026-10-14 · Official Announcement (~3 min read) · Companion Documentation: OpenTelemetry for the Claude API (Beta)
A production agent task routinely crosses application business logic, multiple Messages API round-trips, server-executed tools (such as web_search and bash), client-side tools inside an SDK tool_runner or self-hosted sandbox, and asynchronous Managed Agents turns spanning multiple threads. Aggregate HTTP status codes and total API latency cannot answer three practical engineering questions: which internal step drove tail latency, which prompt or tool argument caused semantic drift, and how many non-duplicated tokens the call tree actually consumed. On October 14, 2026, Anthropic announced native OpenTelemetry (OTel) trace export across Claude Managed Agents, the Messages API, and Claude SDKs (Public Beta, governed by the Beta Services terms), exporting over OTLP using OpenTelemetry GenAI semantic conventions into teams’ existing observability and evaluation stacks.
Primary-Source & Evidence Scope: This note is verified directly against frozen captures of both primary documents above (the October 14, 2026 announcement and the companion OpenTelemetry for the Claude API admin reference). Both sources are architectural documentation, span-schema specifications, and four customer workflow vignettes (Foxglove, Ramp, Sterling Labs, and Head of Infrastructure Ankush Sharma); neither source reports controlled experiments, ablation benchmarks, MTTR reductions, or localization accuracy scores isolating native OTel export. Ramp’s reported 10–20% token reduction and 30% faster sessions on some agents come from its pre-existing Reflect loop running on Langfuse rather than an isolated causal test of native OTel export, and the
48.2k,30.9k, and18.4kbars in the official overview graphic are illustrative UI mockups. Assistant-derived operational guardrails below are explicitly distinguished from documented Anthropic specifications.
Dual-Path Collection Architecture: SDK vs. API Spans and Async Session Stitching
The most consequential architectural detail in Claude’s OTel design sits between the announcement’s high-level summary (“Managed Agents and the Messages API need a destination in the Claude Console, while Claude SDKs export traces automatically”) and the companion documentation’s instrumentation table. Full execution visibility actually relies on two distinct collection paths linked via W3C traceparent propagation:
- Client-side SDK tracing: Requires installing the Claude SDK and registering an OTel
TracerProviderin application code (no Console admin permission required; works across any cloud environment, limited to clients using the SDK). It emitsCLIENTspans that capture application-side execution:anthropic.messages.tool_runner,anthropic.custom_tool_use(local custom tools), tools running inside a self-hosted sandbox, and peripheral API requests such as file uploads. On its own, SDK tracing misses individual server-side model runs within a request, API-hosted server tools (web_search,bash), and Managed Agents turns. - Server-side API tracing: Enabled by an administrator adding an OTLP destination in the Claude Console (covers any client regardless of SDK adoption; supported on Claude Platform and Claude Platform on AWS). It emits
SERVERspans exposing eachanthropic.model_request, API-run server tools and MCP connector tools, plus Managed Agentsanthropic.session.turnandanthropic.session.outcome_evaluationspans. On its own, API tracing misses localtool_runnerorchestration and self-hosted sandbox execution.
Click to zoom ↗Enabling both together stitches client and server perspectives across two structurally different execution patterns documented in the reference traces:
- Messages API +
tool_runner(synchronous multi-hop inside one trace): The application opensanswer_questionand callsanthropic.messages.tool_runner, which issues the firstanthropic.messages.create(CLIENT). Only with API tracing enabled does that client span expand downstream into the APISERVERspan and its internal sequence:anthropic.model_request→ server-runanthropic.tool_use web_search→ secondanthropic.model_requestrequesting local toolget_weather. Control then returns to the SDK to runanthropic.custom_tool_use get_weatherlocally, followed by a secondanthropic.messages.create(CLIENT→SERVER→anthropic.model_request) producing the final response. The announcement also notes that teams already exporting Claude Code or Cowork traces can view Claude Platform agents in the same backend. - Managed Agents sessions (asynchronous
POST /chatoutliving parent spans across traces and threads): In the documentedPOST /chattrace, the application starts the SDK session tool runner (anthropic.sessions.events.streamandlist) and dispatches the user message viaanthropic.sessions.events.send(CLIENT→SERVER). Crucially, the API-emittedanthropic.session.turnstarts late insidesendand runs past the end of its parentsendspan. Inside that turn sitanthropic.model_request,anthropic.tool_use bash(gen_ai.tool.name = bash), and a nestedanthropic.session.turnexecuting on another thread, until the model requests custom toollist_issuesand the turn ends with stop reasonrequires_action. The SDK executesanthropic.custom_tool_use list_issues, posts the result viasessions.events.send, and triggers a secondanthropic.session.turn.
Because follow-up Managed Agents requests can originate from new root traces—and enabling multiagent spawns multiple threads within one session—default trace waterfall trees frequently fragment a single user task. The documentation specifies two deterministic join keys: group by gen_ai.conversation.id (sorted by start time) to reconstruct a single thread transcript, and group by anthropic.session.id across traces to assemble the complete multi-thread session. Treating temporal proximity as causality without these IDs risks conflating unrelated concurrent sessions or missing prior cross-thread context.
OpenTelemetry GenAI Semantic Conventions and Capability Matrix
To prevent dashboards and eval pipelines from locking into vendor-specific schemas, Claude Platform maps core telemetry onto OpenTelemetry GenAI semantic conventions—including gen_ai.system_instructions, gen_ai.input.messages, gen_ai.output.messages, gen_ai.tool.name, gen_ai.tool.call.arguments, gen_ai.conversation.id, and gen_ai.usage.input_tokens—while introducing anthropic.* attributes for platform-specific semantics such as anthropic.session.id (cross-trace session aggregation), anthropic.tool_result.content (tool outputs), anthropic.content.truncated (payload truncation indicator), and anthropic.usage.compaction.* (compaction accounting).
Built atop standard OTLP transport, the announcement and documentation group 12 named partner platforms (alongside any OTLP-accepting backend) into three operational roles:
- Debug agents alongside infrastructure: Grafana Cloud, Honeycomb, Sentry, and Splunk co-locate model calls and tool steps beside application logs, databases, and service traces to isolate whether latency or failure stems from Claude, another provider, or downstream code.
- Improve agents using production data: Arize AI, Braintrust, Datadog, Langfuse, LangSmith by LangChain, New Relic, and PostHog convert production traces into evaluations, surface recurring quality regressions, and track prompt or architecture changes against product telemetry.
- Organization-wide cost and security governance: Databricks Unity Gateway tracks token usage by team and flags anomalous activity (subject to the best-effort delivery boundary detailed later).
| Capability / Span Coverage | SDK Tracing Only (CLIENT) |
API Tracing Only (SERVER) |
Both Together | Key Schema & Deployment Notes |
|---|---|---|---|---|
| Messages API & Sessions API requests | Supported | Supported | Supported (paired parent-child) | anthropic.messages.create distinguishes SDK (CLIENT) vs. API (SERVER) by span kind |
| Token usage attributes | Supported | Supported | Supported (dedup required) | gen_ai.usage.input_tokens already includes cache read/write tokens |
| Each model run within a request | Not visible | Supported | Supported | anthropic.model_request exposes internal multi-step model turns |
| Managed Agents turns & outcomes | Not visible | Supported | Supported | anthropic.session.turn and anthropic.session.outcome_evaluation |
| Server tools & MCP connector tools | Not visible | Supported | Supported | E.g. anthropic.tool_use web_search, bash (gen_ai.tool.name) |
Client tool_runner & self-hosted sandboxes |
Supported | Not visible | Supported | anthropic.messages.tool_runner and anthropic.custom_tool_use |
| Other API calls (e.g. file uploads) | Supported | Not visible | Supported | Only client-side SDK spans cover auxiliary non-message endpoints |
| Permissions & cloud availability | No admin permission; any cloud; SDK clients only | Console Admin; any client; Claude Platform & on AWS | Requires SDK TracerProvider + Admin destination |
W3C traceparent links SDK and API spans into one trace |
Content Mode Tiering, Compliance Boundaries, and 0.75 MB Truncation
Exporting agent execution traces immediately creates a tension between diagnostic fidelity and data-governance exposure. Claude Platform provides two content modes configurable per Console destination and per SDK client, yet several documented edge cases diverge from naive expectations of “metadata-only means zero custom text”:
- Default
Metadata only(metadata_only) still emits developer-authored text: By default, spans record identifiers, timing, status, token counts, and application-supplied text chosen by the caller—explicitly including agent names and descriptions, tool names and descriptions, and MCP server names. Any code that dynamically interpolates tenant identifiers, user names, or secret fragments into tool descriptions or agent names will still export that text inmetadata_onlymode. Full content(content) attribute placement differs by API: On Messages API requests,anthropic.messages.create(SERVER) stores the system prompt ingen_ai.system_instructions, inputs ingen_ai.input.messages, and outputs ingen_ai.output.messages. On Managed Agents,gen_ai.system_instructionssits on the firstturnspan of a thread,gen_ai.input.messagesholds user inputs, tool results,system.messageevents, and cross-thread messages,gen_ai.output.messagescaptures agent replies and tool steps, and eachtoolspan storesgen_ai.tool.call.argumentsplusanthropic.tool_result.content.
Across enterprise compliance and retention regimes, the documentation spells out three decisive boundaries:
- Downstream governance handoff: Exported trace payloads fall under the receiving observability platform’s own access-control and retention settings; teams must audit downstream ACLs independently.
- HIPAA, FERPA, and K-12 override asymmetry: Under a HIPAA, FERPA, or K-12 data-handling restriction with Anthropic, Console API destinations export metadata only regardless of configured content mode—but SDK spans are unaffected. Because SDK telemetry originates inside the customer’s own application runtime, leaving
contentenabled on the SDK client can still leak protected prompts straight to an OTLP vendor even when Console destinations are locked down server-side. - Zero Data Retention (ZDR) split: Under ZDR, Messages API requests still support
Full contentexport because the API buffers exported payloads in memory only until OTLP delivery. By contrast, Claude Managed Agents is not eligible for ZDR, and its retention behavior does not change when OpenTelemetry is enabled.
Even with Full content enabled, traces do not guarantee lossless conversation capture because each span imposes a 0.75 MB default content cap. The docs note this fits roughly a 200k-token English context window while staying under the 1 MB HTTP payload ceiling common across observability backends and proxies (selecting a partner Provider in the Console sets a backend-compatible cap; full 1M-token contexts require roughly 4 MB, tunable via traces.max_content_bytes in the SDK or Maximum content size in MB under Console Advanced settings).
Crucially, payloads exceeding the limit set anthropic.content.truncated = true and truncate asymmetrically:
- Request spans drop the head first:
gen_ai.system_instructionsand the earliest messages are stripped first, retaining the latest tail. - Tool spans drop the tail first: Blocks are removed from the end of tool results.
- Multimodal payloads emit types only: Images and documents appear only as their type—raw image bytes or PDF contents never enter trace attributes.
As an engineering implication derived from this documented behavior: head-first truncation on request spans creates subtle misattribution risk during post-hoc debugging. When early system constraints vanish while recent turns survive intact, evaluators inspecting only retained attributes can falsely diagnose a model failure as unprompted instruction drift. Automated trace-to-eval samplers should filter on anthropic.content.truncated and flag multimodal or oversized-tool traces as incomplete for root-cause labeling.
Token Deduplication, Best-Effort Delivery Limits, and the Trace-to-Eval Loop
A common pitfall after enabling full SDK + API OTel visibility is summing gen_ai.usage.* across every node in a trace tree—producing dramatically inflated token totals. The Counting tokens specification establishes four mandatory accounting rules:
- Pick one source per request: When a Messages API request carries both an SDK
CLIENTspan and a child APISERVERspan onanthropic.messages.create, sum only one source and prefer the API (SERVER) span (noting that on SDK fallback-model routing, the span reflects only the model that actually served the response). - Never double-sum nested API tiers or compaction fields: For Messages API server spans, sum either
anthropic.messages.create(SERVER) or itsanthropic.model_requestchild spans—never both. When context compaction triggers, API consumers addanthropic.compactionspans (while ignoring the parentanthropic.messages.createspan’santhropic.usage.compaction.*attributes, which hold identical counts); SDK-only consumers sumanthropic.messages.create(CLIENT) plusanthropic.usage.compaction.input_tokensandoutput_tokensbecausegen_ai.usage.*omits compaction tokens. For Managed Agents, sumanthropic.model_requestplusanthropic.session.outcome_evaluationspans. - Do not add prompt cache attributes on top:
gen_ai.usage.input_tokensalready includes tokens read from and written to the prompt cache—adding cache attributes separately double-counts cached tokens. Deduplicate export retries by(trace_id, span_id)if the backend does not automatically do so. - Separate best-effort telemetry from the billing ledger: OTel span delivery is best effort, meaning spans can be dropped in transit, and callers can suppress export entirely by disabling the sampled flag in the W3C
traceparentheader. Traces therefore cannot serve as a complete usage ledger or leaked-API-key detector; complete per-key accounting—including untraced requests—requires the Usage API.
Across the announcement’s four customer stories, teams already map these traces into distinct operational loops while leaving causal attribution disciplined:
- Foxglove (Roman Shtylman, Co-Founder & CTO) pipes robotics-debugging agent traces into PostHog alongside product analytics to measure real-world behavior, locate weaknesses, and prioritize engineering fixes.
- Ramp (David Traina, Senior Software Engineer) built Reflect, an internal agentic system that scores Langfuse traces, identifies recurring failures, and proposes fixes—reporting 10–20% lower token usage and 30% faster sessions on some agents. Crucially, Traina frames Reflect’s results as pre-existing work (
"we've already cut...") that native Claude API OTel export can now feed with high-fidelity telemetry"with no extra steps", rather than a controlled benchmark of OTel export itself. - Sterling Labs (Hyon Lee, CTO) streams 24/7 live market-analysis agent traces into Langfuse with zero custom instrumentation overhead.
- Financial bookkeeping & auditability (Ankush Sharma, Head of Infrastructure) sends Claude Platform traces to Grafana Cloud so prompt versions, tool calls, latency, and token spend appear inside the same trace as reconciliation and journal-entry workflows when auditors examine what an agent did and why.
Turning the official graphic’s "Full content mode → Evals" arrow into a reliable engineering pipeline requires two explicit non-automated gates derived from the schema mechanics above: first, tool/HTTP status does not establish task correctness—promoting a trace into a regression benchmark requires checking anthropic.content.truncated == false, stitching full cross-trace context via anthropic.session.id, and labeling against task constraints; second, teams must guard against the visibility paradox when rolling out instrumentation, since enabling API-side spans or Full content surfaces previously invisible tool retries and sub-thread errors without any genuine regression in model reliability.
| Mechanism / Evidence Item | Verified Primary-Source Specification | Common Operational Misreading | Practical Deployment Guardrail |
|---|---|---|---|
| Content modes & HIPAA/ZDR | metadata_only still exports developer-chosen agent/tool/MCP names & descriptions; HIPAA/FERPA/K-12 locks Console API destinations only (SDK unaffected); Managed Agents ineligible for ZDR |
Assuming metadata_only emits zero custom text, or assuming org compliance flags auto-redact SDK spans |
Keep PII/secrets out of tool schemas; lock SDK to metadata_only client-side under regulated workloads; audit OTLP vendor retention |
| 0.75 MB cap & truncation | Sets anthropic.content.truncated = true; requests strip system_instructions + earliest messages first; tools trim result tails; images/docs emit type only |
Diagnosing truncated request tails as “model ignored system instructions”, or expecting multimodal replay from traces | Exclude truncated = true traces from root-cause evals; raise cap toward ~4 MB for 1M-token contexts where proxies permit |
| Token counting & compaction | Prefer API (SERVER) over SDK (CLIENT); sum create OR model_request; input_tokens includes cache; separate SDK vs. API compaction rules |
Summing every span in a waterfall tree or adding prompt-cache attributes on top of input_tokens |
Enforce (trace_id, span_id) retry dedup and strict single-tier aggregation queries in dashboards |
| Best-effort delivery vs. billing | OTLP delivery is best effort (spans may drop); callers can turn off traceparent sampling; complete accounting requires Usage API |
Using OTel traces as an authoritative spend ledger or leaked-API-key monitor | Reconcile team budgets and security anomalies against the Usage API rather than sampled OTLP spans |
| Customer & visual numbers | Ramp Reflect (10–20% token cut, 30% faster sessions) is prior Reflect loop experience; 48.2k/30.9k/18.4k in PNG are UI mockups |
Citing Ramp figures as an OTel controlled benchmark or reading PNG numbers as measured telemetry | No controlled OTel ablation benchmark exists in the sources; establish fixed pre/post instrumentation baselines locally |
Primary Sources & Verification Links
- Official announcement: Anthropic, Agent observability on the Claude Platform, 2026-10-14 (Public Beta, including overview diagram and customer vignettes from Foxglove, Ramp, Sterling Labs, and Ankush Sharma).
- Companion engineering reference: Anthropic, OpenTelemetry for the Claude API (Admin → OpenTelemetry Beta, covering SDK vs. API coverage, content modes, HIPAA/FERPA/K-12 and ZDR boundaries, 0.75 MB truncation, Messages API and Managed Agents trace walkthroughs, token counting, and Usage API limits; internally referencing OpenTelemetry span reference, Token usage, Usage API, Claude Code monitoring, Agent SDK observability, and Cowork activity monitoring by title).
AI-Assisted Curation & Archival Note: Both this English deep-dive and its paired Chinese edition (中文笔记) were rewritten and verified by the assistant directly from frozen captures of the official announcement and OpenTelemetry for the Claude API documentation, preserving original
id,date: '2026-10-14',permalink,published_at, andsource_urlmetadata alongside the official preserved overview PNG (28fe34519808d40faa51162351234a3790230860.png) and two newv3-bluediagrams (claude-otel-telemetry-pipeline-en.svg,privacy-tiering-eval-loop-en.svg). Only directly verified URLs are linked, customer loop results are strictly distinguished from controlled OTel benchmarks, and assistant-derived operational gates are labeled as such.