Artificial Intelligence (AI)

Claude OpenTelemetry Tracing Is in Beta: What Agencies Should Turn On, and What to Keep Private

An aerial drone photograph looking down at a snow-covered meadow dotted with small evergreens in low late-afternoon sun, where many cross-country ski tracks branch, cross and rejoin, each groove holding a thin blue shadow so every path can be followed from start to end, a visual for Claude OpenTelemetry tracing, which records each Claude API request, tool call and Managed Agents session as a path you can follow

Claude OpenTelemetry export launched in beta on October 14, 2026. It lets you trace Claude API requests and Claude Managed Agents sessions in the observability tool you already use. The Claude SDKs now emit spans in seven languages, PHP included, and the API itself can send spans to a destination you add in the Claude Console.

That fills a common gap for agencies. A chatbot on a client’s WordPress site, a Drupal form that tags submissions, or an overnight Managed Agent usually logs little more than "it worked" or "it failed." Claude OpenTelemetry tracing records each request, its tokens, its timing, each tool call and each error.

The short version: turn on API tracing in the Console with the default Metadata only setting. That covers any client, including PHP plugins that do not use Anthropic’s SDK. Add SDK tracing where you control the code. Leave Full content off until the client agrees, in writing, to send prompts and responses to your observability vendor. Anthropic’s pricing page lists no charge for the feature as of October 15, but your backend may bill for what it ingests.

This post covers what shipped, the two setups, four common backends, the privacy settings, and how OpenAI and Google compare.

What Claude OpenTelemetry export covers

Anthropic’s platform release notes for October 14 say the feature traces Messages API requests and Managed Agents sessions. The Claude SDK emits spans in Python, TypeScript, C#, Go, Java, PHP and Ruby.

A trace is the full record of one request through your system. A span is one step in it, such as a model request or a tool call. Anthropic’s spans use the OpenTelemetry GenAI semantic conventions, so a tool that understands those attributes can read them without custom mapping.

Anthropic’s Claude OpenTelemetry overview lists the uses: debug failed or slow requests, track token spend and latency, and build evals from real traffic.

The feature is in beta. Span names and attributes can change, so Anthropic says to pin your SDK version. Dashboards built this month may need rework later.

The setup pages mention no beta header. You turn it on with a Console setting or an SDK option.

Two ways to turn on Claude OpenTelemetry tracing

There are two setups, and you can run both. With both on, a request’s SDK spans and API spans land in one trace.

Question SDK tracing API tracing
Where you set it up In your code Claude Console, OpenTelemetry settings
Who can set it up Anyone with the code Console Admin role
Which clients it covers Only code using a Claude SDK Any client
Server tools such as web search No Yes
Client tools run by the tool runner Yes No
Cloud platforms Any Claude Platform, Claude Platform on AWS

The coverage row matters most for WordPress and Drupal work. Only code built on Anthropic’s SDK emits SDK spans. Many CMS plugins send their own HTTP requests instead. Those still show up through API tracing.

If a client reaches Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry, only SDK tracing applies.

Setting up API tracing in the Console

Anthropic’s API tracing guide walks through the steps. An Admin opens the OpenTelemetry settings page in the Console and clicks Add destination.

The form asks for:

  • Provider. A listed platform, or Custom. Listed platforms ask for their own details, such as an API key.
  • OTLP endpoint URL. An HTTPS base URL with a hostname, not an IP address. Do not add `/v1/traces`; the API adds it.
  • Request headers. Put credentials here. The Console hides the values after you save.
  • Content mode. Metadata only or Full content.
  • Workspaces. All, Selected, or All except.

After saving, use Test under More actions and look for an anthropic.test span in your backend.

The workspace setting helps agencies. If each client has its own Console workspace, each client’s Claude OpenTelemetry spans can go to a different destination. The limit is 10 destinations per organization.

Delivery is best effort and at least once. A span can be lost or arrive twice, so remove duplicates by trace ID and span ID. A destination is turned off after 24 hours of failed deliveries.

SDK tracing and the PHP SDK

The SDK tracing guide works the same way in each language. Your application registers an OpenTelemetry tracer provider and exporter. The Claude SDK then emits a span for each request and each tool the tool runner runs.

The settings, shown in the guide as options and environment variables:

  • Content mode. Default `metadata_only`. Set `ANTHROPIC_OPEN_TELEMETRY_TRACES_CONTENT_MODE=content` to include prompts and responses.
  • Turn off for one client. `ANTHROPIC_OPEN_TELEMETRY=false`.
  • Conversation ID. Writes `gen_ai.conversation.id`, so you can group a chat’s requests.
  • Propagation. On by default; sends trace context headers with each request.

For PHP, the Claude SDK is the Composer package anthropic-ai/sdk, which needs PHP 8.1 or later. The guide’s code samples are in Python. For the exporter, it links to the OpenTelemetry PHP docs, which use open-telemetry/exporter-otlp with an HTTP client such as php-http/guzzle7-adapter. The gRPC transport also needs the grpc PHP extension.

Two PHP limits are worth knowing. The guide says the PHP MCP SDK does not pass trace context to MCP servers on its own. And spans from self-hosted Managed Agents sandboxes come only from the Python, TypeScript and Go SDKs.

Pointing traces at Grafana, Honeycomb, Datadog or Jaeger

Anthropic says Claude OpenTelemetry traces can go to any platform that accepts OTLP. It names twelve partners, including Grafana Cloud, Honeycomb, Datadog, New Relic, Sentry and Langfuse.

Backend What its docs say to enter Source
Honeycomb Ingest API key; endpoint `https://api.honeycomb.io` (EU: `https://api.eu1.honeycomb.io`). Custom setups add an `x-honeycomb-team` header. Honeycomb docs
Grafana Cloud OTLP endpoint and Instance ID from the OpenTelemetry card, plus a token with `traces:write` scope Grafana docs
Datadog Your OTLP trace endpoint, with `dd-api-key` and `dd-otlp-source=llmobs` headers Datadog OTel docs
Jaeger (self-hosted) OTLP over HTTP on port 4318 by default OpenTelemetry PHP docs

The Honeycomb guide says to leave the dataset empty. Honeycomb names it claude-platform. The Grafana Cloud guide covers the Console destination.

Self-hosted Jaeger needs one extra step for API tracing. The Console accepts only OTLP over HTTP with protobuf, at an HTTPS URL on port 443. Anthropic’s guide says to configure a Collector’s receiver for HTTPS on 443, or put a reverse proxy in front of it. The server also needs a public address.

For SDK tracing, the standard OpenTelemetry settings apply. The OTLP exporter reference defines them:

OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.example.com
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS=api-key=YOUR_KEY

With HTTP, the exporter adds /v1/traces to the base endpoint. The defaults are port 4318 for HTTP and 4317 for gRPC.

What Claude OpenTelemetry spans tell you

The span reference lists the attributes. Four groups cover most agency questions.

Cost per request. Spans carry gen_ai.usage.input_tokens, output tokens, cache reads and writes, and thinking tokens. There is no cost or price attribute, so multiply tokens by your model’s price yourself. Honeycomb’s guide says it adds estimated cost fields at ingest. Our posts on Claude Haiku 5.5 pricing and input versus output tokens cover the math.

Failed tool calls. error.type takes values such as rate_limit_error, tool_error and mcp_authentication_failed_error. Tool spans carry the tool name. http.request.resend_count shows how often the SDK retried.

Latency. Span start and end times give duration. Streaming SDK spans also record gen_ai.response.time_to_first_chunk, the wait before the first text arrives.

Managed Agents. Turn spans, tool spans and outcome evaluation spans appear. Group a whole session by anthropic.session.id.

One caution: Anthropic says exported spans are not a complete record of API usage. For invoicing a client, use the Usage API. Our post on when more tokens make output worse explains why that breakdown is worth having.

Prompt content: what leaves, and where it goes

Each destination and each SDK client has a content mode.

  • Metadata only is the default. Spans hold IDs, timing, status, token counts, and names you choose, such as agent and tool names.
  • Full content adds prompts, responses, system prompts, tool arguments and tool results.
Before you turn on Full content: prompts on a client site can hold member names, donor notes, student questions or health details. With Full content, that text is stored by your observability vendor under its own access and retention rules, not Anthropic’s. Get the client’s approval first, and check the vendor’s retention settings.

Anthropic adds three rules. If an organization has a HIPAA, FERPA or K-12 data-handling restriction with Anthropic, Console destinations export only metadata, whatever the setting. SDK spans are not affected by that restriction, so code-level settings still need care. With zero data retention, Full content still works for Messages API requests; the API holds the content in memory only until delivery. Managed Agents is not eligible for zero data retention.

Each span holds up to 0.75 MB of content by default. Larger content is cut, and anthropic.content.truncated is set to true.

Claude Code 2.1.300 and GenAI attributes

Claude Code has its own telemetry, separate from Claude OpenTelemetry export for the API. The Claude Code changelog for version 2.1.300, dated October 14, adds GenAI semantic-convention attributes to trace spans, such as gen_ai.provider.name, gen_ai.conversation.id, gen_ai.tool.name and error.type. It also splits cache writes by lifetime in the api_request event.

The same release fixed a privacy-relevant bug. A prompt that a mod’s prompt.submit hook rewrote or dropped was still recorded as typed in telemetry. If you use Claude Code mods to strip sensitive text, update.

Claude Code’s monitoring guide says tracing is off by default and in beta. It needs CLAUDE_CODE_ENABLE_TELEMETRY=1 and CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1. Prompt text and tool details are redacted unless you opt in. Pair that with the controls in our post on Claude Code permission modes.

How OpenAI and Google handle agent tracing

Vendor Where traces go Prompt content by default
Anthropic Any OTLP backend Off (Metadata only)
OpenAI Agents SDK OpenAI’s Traces dashboard, plus optional trace processors On
Google Agent Runtime Cloud Trace in your Google Cloud project Off until opted in

OpenAI’s Agents SDK tracing docs say tracing is on by default. trace_include_sensitive_data defaults to true. The page lists 31 external trace processors, including Datadog and Langfuse, and does not mention OpenTelemetry. Tracing is unavailable to organizations under zero data retention. We covered OpenAI’s account changes in our post on OpenAI usage tiers.

Google’s Agent Runtime tracing page, under the Gemini Enterprise Agent Platform name, uses OpenTelemetry and sends traces to Cloud Trace. Prompts and responses are logged only when OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is set to EVENT_ONLY. Google says span formats are experimental.

Of the three, Claude OpenTelemetry export is the least tied to one vendor’s dashboard. OpenAI’s needs the least setup and captures the most by default.

Frequently Asked Questions

When did Claude OpenTelemetry export launch?

October 14, 2026, in beta. It covers Messages API requests and Claude Managed Agents sessions.

Does Claude OpenTelemetry export cost extra?

Anthropic’s pricing page lists no charge for it as of October 15, 2026. Your observability backend may bill for the spans it ingests and stores, so check its pricing.

Is there a beta header to send?

Anthropic’s setup pages do not mention one. API tracing is a Console destination, and SDK tracing is an SDK option. Managed Agents calls still use their own `managed-agents-2026-04-01` header.

Which SDK languages emit spans?

Python, TypeScript, C#, Go, Java, PHP and Ruby. Spans from self-hosted Managed Agents sandboxes come only from the Python, TypeScript and Go SDKs.

Will a WordPress AI plugin show up in traces?

Yes, through API tracing, which covers any client on Claude Platform or Claude Platform on AWS. It shows SDK spans only if the plugin uses Anthropic’s PHP SDK and your site registers a tracer provider.

Are prompts sent to my observability tool?

Not by default. Claude OpenTelemetry export starts in Metadata only mode. Full content adds prompts, responses and tool results, and must be turned on per destination or per SDK client.

Can I send traces to a self-hosted Jaeger server?

Yes. SDK tracing can export to Jaeger’s OTLP port directly. For API tracing, the endpoint must be HTTPS on port 443 at a public hostname, so put a Collector or reverse proxy in front.

Can I use traces to bill clients for Claude usage?

Use them as a guide, not the invoice. Anthropic says delivery is best effort, so spans can be lost or duplicated. Use the Usage API for billing figures.

Does it work on Amazon Bedrock or Google Cloud?

SDK tracing works on any platform. API tracing works only on Claude Platform and Claude Platform on AWS, as of October 2026.

Digital Matters

Artificial Intelligence (AI) Desk