How to Trace Anthropic SDK Calls With the Built-In OpenTelemetry Export
The Anthropic Python and TypeScript SDKs now emit OpenTelemetry spans on their own: register a tracer provider before the first call and every messages.create becomes an anthropic.messages.create CLIENT span with gen_ai.* token, model and stop-reason attributes. Content mode, conversation IDs, user.id baggage, linking to the Claude Platform's server-side spans, streaming and tool runner behavior, and the env-var override trap, checked against anthropic 2.8.0.