api changedmanage-claude/opentelemetry/api
Recorded here
Lines+1added
Lines−1removed
From line
257
where the diff opens
First seen
14 Oct 2026
this site's first read of the page
Recorded edits15to this page, all time
The whole hunk
from line 257, old and new numbered
/
from line 257
257257The API reads each request’s trace context from the W3C [`traceparent` header](https://www.w3.org/TR/trace-context/). If the sampled flag in the header is off, the API doesn’t emit the request’s span or the spans under it.
258258
259259<Tabs>
260 <Tab title="With the Claude SDK">
260 <Tab title="With the Anthropic SDK">
261261 To connect the API spans, [set up SDK tracing](https://platform.claude.com/docs/en/manage-claude/opentelemetry/sdk) in your application and call the SDK from inside one of your own spans. Your span then contains the SDK span, which contains the API span. Send all of these spans to the same observability platform, so that it can show them as one trace. See the example traces of [a Messages API request](https://platform.claude.com/docs/en/manage-claude/opentelemetry#a-messages-api-request) and [a Managed Agents session](https://platform.claude.com/docs/en/manage-claude/opentelemetry#a-managed-agents-session).
262262
263263 The following example sends a user message to a session inside your own span:
No line in this hunk matches that.