Trace Every Agent Across Your Stack: Why Handoffs Are Where Observability Breaks

A single trace line threading through agents built on LangGraph, CrewAI, AutoGen and MCP across two clouds

A single trace line threading through agents built on LangGraph, CrewAI, AutoGen and MCP across two clouds

Most teams that run AI agents in production can tell you what a single agent did. Far fewer can tell you what happened when that agent asked another agent for help, and that agent called a tool hosted somewhere else.

That gap is where the expensive problems live. A pricing agent returns a bad number, a support agent repeats it to a customer, and the logs for each system look perfectly healthy. Nothing is broken inside any one box. The failure sits in the space between them.

This article is about closing that space. It covers why cross-agent tracing breaks, what the emerging OpenTelemetry conventions do and do not give you, how to propagate context across frameworks and clouds, and how to turn traces into cost, quality and audit answers. It deliberately focuses on the handoff, because that is where most stacks lose the thread.

A note on sources: the figures below come from published surveys, vendor announcements and project documentation as of 2026. The OpenTelemetry GenAI conventions are still in flux, so verify attribute names against the current spec before you build on them.

The Real Problem: Agents Fail Between Systems, Not Inside Them

Classic application monitoring assumes a request enters a service, touches a few dependencies and returns. Multi-agent systems do not behave that way. A planner decomposes a goal, delegates to specialists, receives partial results, retries, and sometimes re-plans.

Failures migrate to coordination

Research on multi-agent failures points the same direction. The MAST study analysed 200 traces across seven agent frameworks and found recurring failures in system design, agent calibration and task verification. These are coordination problems more than raw model-quality problems.

That matters for tooling. If the dominant failure class is “agent A passed agent B the wrong thing” or “nobody verified the result”, then a dashboard of per-model latency and token counts will not find it.

What a healthy log still hides

Each framework logs its own view. The planner logs that it delegated. The specialist logs that it received a task and finished. Both are accurate, and neither shows that the task description lost a constraint in transit.

Only a trace that links the two sides, with the payload and decision at each step, reveals it.

Where the Industry Actually Stands

Adoption of basic observability is high. LangChain’s 2026 survey of 1,340 practitioners found 89% use some form of agent observability, and 62% trace individual steps and tool calls. Among teams already in production, those figures rise to 94% and 71.5%.

Infographic showing 89% use agent observability, 62% trace steps and tool calls, 37.3% evaluate on live traffic

Tracing is not the same as knowing

The same survey found only 37.3% of teams evaluate agents on live traffic. So most teams can see what happened, but fewer judge whether it was good while it is happening.

Note too that these numbers measure tracing within an agent. They say little about tracing across agents, which is a harder problem and the one practitioners keep flagging as the central gap.

The fragmentation tax

Real stacks are mixed. One team runs LangGraph for orchestration, CrewAI for a research crew, the OpenAI Agents SDK for a customer-facing assistant, and a vendor-hosted agent bought off the shelf. Each has its own telemetry story, and each defaults to starting a new root span.

Anatomy of an Orphaned Trace

Comparison of orphaned traces with disconnected root spans versus one stitched trace

An orphaned trace happens when a downstream agent starts a fresh trace instead of continuing the caller’s. Practitioners report this regularly in handoffs between LangGraph, CrewAI, AutoGen, the OpenAI Agents SDK and custom or hosted agents.

Why it happens

  • No propagation at the boundary. The caller does not inject the trace context into the request, message or queue payload.
  • No extraction on arrival. The receiving framework ignores incoming headers and creates its own root.
  • Non-HTTP transports. Message queues, shared databases and in-process handoffs carry no headers by default.
  • Vendor black boxes. A hosted agent may not accept or emit context at all.

The consequence

You get N small traces instead of one workflow. Root-cause analysis turns into manual timestamp matching, and per-workflow cost becomes guesswork because token spend is scattered across unrelated roots.

W3C Trace Context is the standard answer, but it only helps when every framework in the chain propagates it correctly. That “every” is the hard part.

OpenTelemetry GenAI Conventions: What You Get and What You Don’t

OpenTelemetry’s GenAI semantic conventions are emerging as the shared telemetry contract for agents. They standardise span names and attributes for model calls, agent invocations, tool execution, token usage and response metadata.

The useful part

A common gen_ai.* schema means different backends can read the same data. That reduces dependence on proprietary formats and lowers the cost of switching vendors later. Attributes such as gen_ai.agent.name, gen_ai.agent.id and gen_ai.tool.name let you group and filter by agent and tool.

The caveat

The conventions remain at Development stability, and the project moved them to a dedicated repository in 2026. Agent and tool attributes are less mature than chat and embedding ones. Reports also mention a June 12, 2026 release that deprecated some existing attributes, so names can and do change.

Practical response: pin the semantic-convention version you build against, and isolate instrumentation from application logic so a rename is a one-place fix.

Instrumentation coverage is growing

An OpenTelemetry effort used an agent-driven harness with Weaver validation to develop instrumentation for CrewAI, LangChain, LangGraph, LiteLLM, AutoGen, Google ADK, Claude Agent SDK, Microsoft Agent Framework, MCP and others. Human review stayed in the pull-request loop. Coverage is improving, but check each library’s actual output rather than assuming.

Propagating Context Across Every Boundary

Treat every agent boundary as a service boundary. The rule is simple: whatever crosses the boundary carries the trace context with it.

HTTP and gRPC

Use the standard traceparent and tracestate headers. Most OpenTelemetry HTTP instrumentation does this automatically, but confirm that your agent framework’s HTTP client is actually instrumented.

Queues and event buses

Inject context into message metadata on publish, and extract it on consume. Where a single task fans out to several workers, create span links rather than forcing a single parent, so the fan-in remains understandable.

Agent protocols

MCP and A2A boundaries are becoming central to proposed instrumentation. If your agents talk over these protocols, check whether your SDK carries context in the request metadata, and add it yourself if not.

In-process handoffs

Even inside one runtime, a framework can run sub-agents in separate tasks or threads that drop the active context. Test this explicitly. A handoff that works in a demo can orphan under async execution.

Vendor-hosted agents

If a hosted agent will not accept context, wrap the call. Create a span on your side that records the request, response, latency and cost, and tag it as an external agent. You lose the inside view but keep the workflow connected.

A Worked Example: Three Frameworks, Two Clouds

AWS published a sample architecture that shows the target state. A travel concierge spans three frameworks (Strands, CrewAI and LangGraph) across AWS and Google Cloud. OpenTelemetry and trace-context propagation stitch each specialist agent’s activity into one end-to-end trace.

Trace waterfall for a multi-agent travel concierge showing planner, specialist agents, tool calls and token cost

What the trace shape looks like

  1. A root span for the user request.
  2. A planner agent span with child spans for each model call.
  3. Delegation spans for each specialist, regardless of framework or cloud.
  4. Tool-call spans under each specialist.
  5. A synthesis span where results are merged.

The bug a single log would miss

A demonstration from Band linked customer-support, pricing and collections agents in a billing-dispute workflow. End-to-end message, handoff, tool and reasoning traces exposed a pricing-resolution bug that conventional single-agent logs would likely have missed. Each agent looked correct in isolation. The trace showed where the wrong value entered.

What to Capture on Each Span

A trace skeleton alone shows timing. Debugging needs content, and governance needs restraint.

Minimum useful attributes

  • Agent name and ID, using the GenAI attributes.
  • Model and provider, plus input and output token counts.
  • Tool name, arguments summary and result status.
  • Handoff reason: who delegated, to whom, and why.
  • Retry count and error type.
  • Business identifiers such as workflow ID, tenant and customer-case ID.

Payloads and privacy

Prompts and responses are the most valuable debug data and the riskiest. Capture them behind a flag, redact sensitive fields before export, and set shorter retention for content than for metadata. Decide this before an incident, not during one.

Capture decisions, not only calls

Useful observability records interactions, not only LLM calls. A planner choosing agent B over agent C is a decision worth logging as an event on the span, with the stated reason.

Using Gateways Without Overtrusting Them

An LLM gateway is an attractive shortcut. Route all model traffic through one proxy and you capture cross-provider calls, cost, latency and some tool activity without touching every codebase.

What gateways do well

They give uniform cost and latency data across providers, and they work for frameworks with weak instrumentation.

What they miss

Practitioners note these methods still do not reliably preserve delegation semantics. A gateway sees a model call; it does not know that call was made on behalf of the planner’s third subtask. Without propagated context, it cannot attach the call to the right parent.

Use a gateway as a safety net for coverage and cost, and framework or SDK instrumentation for structure.

Turning Traces Into Cost Attribution

Once traces connect, cost becomes a query rather than a spreadsheet exercise. Sum token and tool costs under the root span and you have a per-workflow figure.

Questions that become answerable

  • Which workflow type costs the most per completed task?
  • Which specialist agent causes the most retries?
  • How much spend goes to failed runs?
  • Which tenant or customer drives the heaviest usage?

Distributed traces expose latency, retries, tool failures, handoffs and token-cost drivers that logs and aggregate metrics often miss. That is the core argument for investing in them.

Watch for loops

Agents that call each other repeatedly are a common cost leak. A trace depth or span-count alert on a single root catches runaway delegation far sooner than a monthly invoice.

From Tracing to Evaluation

Microsoft’s framing is that production observability should connect execution tracing, failure investigation, response-quality evaluation and optimisation. Traces are the substrate for the other three.

Close the live-evaluation gap

With only 37.3% of surveyed teams evaluating on live traffic, there is room to differentiate. Start with sampled evaluation: pick a percentage of traces, score them with automated checks or reviewers, and attach the score back to the trace.

Verify, because verification fails

MAST highlighted task verification as a recurring failure area. Add explicit verifier spans to workflows and track how often they pass or fail. A workflow with no verification step has no signal to alert on.

Build regression sets from real traces

Failed production traces make the best test cases. Export them, strip sensitive data, and replay them when you change prompts, models or routing.

Vendor Landscape: Choosing a Backend

Platform vendors are moving fast. At Ignite, Microsoft said Azure Monitor now stitches OpenTelemetry traces across agents, models, tools and resources, with cross-agent debugging and Trace Analytics in public preview. External-agent observability and evaluation, covering agents built on other frameworks and hosted on other clouds, reached general availability.

Framework-agnostic platforms are appearing too, aimed at heterogeneous stacks including LangChain and CrewAI, and capturing messages, tool calls, errors, decisions and handoffs in one workflow view. AGNTCY Observe is another interoperability effort worth watching.

Selection criteria

  • Native OTLP ingest so you are not locked to a proprietary SDK.
  • Support for GenAI conventions and a stated plan for version changes.
  • Cross-trace views for handoffs, span links and fan-out.
  • Cost and evaluation features tied to traces.
  • Data controls for redaction, retention and residency.

Because the standard is still developing, favour portability. Send data through an OpenTelemetry Collector so you can switch or dual-write backends without re-instrumenting.

A 30-Day Rollout Plan

Week 1: Inventory

List every agent, framework, host and protocol. Mark each boundary: HTTP, queue, in-process, vendor-hosted. This map shows where orphaning is likely.

Week 2: Instrument and propagate

Turn on OpenTelemetry instrumentation for each framework, deploy a Collector, and fix propagation at the boundaries you identified. Pin the semantic-convention version.

Week 3: Validate end to end

Run one real workflow and check that it renders as one trace. Count root spans per workflow; the target is one. Add wrapper spans for any vendor black box.

Week 4: Add cost, alerts and sampling evaluation

Build per-workflow cost views, alert on span-count or depth anomalies, and begin scoring a sample of live traces.

Common Mistakes

  • Tracing per framework, not per workflow. You end up with excellent islands.
  • Trusting defaults. Assume a framework drops context until you prove otherwise.
  • Logging everything, forever. Raw prompts carry risk; apply redaction and retention rules.
  • Hard-coding attribute names. The spec is still changing.
  • Stopping at observation. Traces without evaluation only tell you the failure happened.

Conclusion: Make the Handoff Visible

Multi-agent failures increasingly come from coordination, verification and inter-agent communication. Tracing that stops at an agent’s edge cannot see them.

The actionable takeaways are short:

  1. Treat each agent boundary as a service boundary and propagate W3C Trace Context across it.
  2. Adopt OpenTelemetry GenAI conventions, but pin versions because they are still in development.
  3. Use gateways for coverage and cost, not for structure.
  4. Wrap vendor-hosted agents in your own spans.
  5. Measure success as one root span per workflow, then build cost, alerts and live evaluation on top.

The ecosystem is still fragmented, and no tool will do this for you completely. But the teams that make handoffs visible now will debug faster, spend less and answer audit questions with evidence rather than reconstruction.

Book a call · 30 minutes

Want this running inside your business?

In 30 minutes we map where your data lives, the first thing worth automating with the hours and dollars behind it, and what 30 days would look like. You keep the plan either way.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *