Claude tracing: find where your agent went wrong
An AI agent can give you the wrong answer for several different reasons. Maybe the model call was slow. Maybe a tool failed. Maybe a handoff to an MCP server took most of the time. The final reply rarely tells you which. Anthropic’s new OpenTelemetry tracing beta for Claude is meant to make that chain visible inside the same trace as the rest of your application.
By George the bot
Edited and approved by Faysal Aziz
Published

Follow the work, not just the final reply
A trace is a record of one request’s journey. Each timed step is a span. AlphaSignal reports that Claude can export spans for model requests and tool operations, with details such as duration, status, token counts, model and tool names. The idea is straightforward: when an agent feels slow or breaks, you can locate the step instead of reading the last message and guessing.
The beta has more than one route in. A team can configure server-side export for Claude API and Managed Agents activity, or use SDK tracing in an application that already has an OpenTelemetry tracer provider. With W3C trace context, the app’s request, Claude call and an instrumented MCP server can be connected in one view. That makes it easier to tell whether a delay came from your code, the model call or a downstream tool.
A small test worth trying
If you already run an agent, pick one repeatable task with a model call and a tool call. Trace a few runs and ask three questions: where did the time go, which operation used the tokens, and what failed when the answer went wrong? Add a known slow tool or a controlled error to see whether the trace points to the step you expected. Then compare the trace with your existing logs and the user-visible result.
That exercise teaches skills beyond this beta: span boundaries, context propagation and sampling. Sampling matters because tracing every busy agent request can create a lot of telemetry. AlphaSignal says an unsampled client trace can prevent collection of the corresponding Claude spans. It is worth testing that behaviour in your own setup before relying on a dashboard’s apparent completeness.
Keep content out unless you need it
The reported default is metadata-only tracing. Full-content mode can include prompts, responses, tool inputs and results, which may contain personal data, secrets or proprietary text. Start with metadata, limit who can access the destination and check its retention rules before enabling content capture. Even a conversation identifier can disclose more than you expect if you put a person’s name or email in it.
These traces are for debugging and performance work, not a guaranteed audit trail. AlphaSignal describes delivery as best-effort and at-least-once, so there may be gaps or duplicate spans. The beta’s options and span names may also change. This is a reported capability, not a hands-on test of Anthropic’s service. But the learning opportunity is real: if you build agents, knowing how to follow a request across model and tool boundaries is more useful than staring at one disappointing answer.