Question-led guide · how-to

How do I trace multi-agent and durable workflows?

A workflow relationship map for delegation, messages, artifacts, waits, checkpoints, resumes, retries, effects, and asynchronous links beyond a span tree.

Direct answer

Trace multi-agent and durable work with stable workflow, task, delegation, message, artifact, checkpoint, attempt, and effect identities. Use parent-child spans for synchronous execution and span links or explicit relations for queues, fan-out, resumes, and cross-trace work. Record who delegated what, authority and budget transferred, artifacts produced, wait/resume reason, and verified outcome. A single deep trace tree cannot represent every durable relationship safely.

Scope

Use this design for orchestrators that delegate to agents or workers, wait for external events, fan out, resume from checkpoints, and create artifacts or effects. It complements durable workflow state; telemetry must not become the only execution record.

Why it happens

Distributed tracing begins with a tree: one parent creates children. Durable workflows form a graph. A task is queued and picked up later, one artifact feeds several agents, a retry replaces an attempt, a human approval resumes work in a new process, or two branches join.

Forcing the graph into one tree creates misleading parentage and very long traces. Starting unrelated traces at every boundary loses the story. Stable domain identities and typed relationships bridge the two.

Diagnosis

Choose a workflow with fan-out and a pause. Attempt to answer:

  • Which actor delegated each task, with what objective and authority?
  • Which attempt is current and which attempts were superseded?
  • Which messages and artifacts connected branches?
  • Which checkpoint resumed this execution episode?
  • Which tool effects belong to the workflow and which were compensated?
  • Which spans were sampled out or expired?

If the answer depends on timestamps and service names, the model lacks durable relationships.

Solution

Create durable workflow and task IDs in the execution store. Each execution episode gets a trace; synchronous operations use parent-child spans. Emit links for enqueue/dequeue, delegation, retry, resume, artifact consumption, and join. Record relation type as governed metadata rather than overloading span names.

Delegation records should include delegator, delegate, objective, input artifacts, granted tools/authority, budget, deadline, and expected output. Message records need producer, consumer, schema, sequence or deduplication identity, and content classification. Checkpoints link prior and resumed episodes.

Build a workflow view from execution records plus trace references. It should remain useful when some traces are absent and should link to verified effects rather than infer them from final text.

Artifact

Use these nodes and relations:

Node Key relations
Workflow contains tasks, decisions, checkpoints, and effects
Task delegated_by, assigned_to, depends_on, supersedes
Attempt/trace executes task, retry_of, resumed_from checkpoint
Message produced_by, consumed_by, deduplicates message
Artifact generated_by, version_of, consumed_by, derived_from
Approval authorizes proposal digest under conditions and expiry
Effect attempted_by, committed_as, verified_by, compensated_by
Join waits_for required branches and records missing/failed branches

Every relation carries time, source system, version, and confidence or status where applicable.

Common mistakes

  • Keeping one unbounded trace open for an entire multi-day workflow.
  • Making every async worker a child as though it ran synchronously.
  • Logging delegation text without transferred authority, budget, or artifact IDs.
  • Treating retry attempts as separate business tasks.
  • Reconstructing effects from agent messages instead of target receipts.

Evidence

  1. OpenTelemetry's GenAI conventions are developing span guidance for agents, workflows, invocations, and related operations.

    The pinned convention snapshot describes agent and framework span patterns, operation names, and attributes.

    Primary source · standard · checked Aug 26, 2026

    Limit: The conventions are evolving and do not fully model every durable queue, delegation, artifact, or effect lifecycle.

  2. Trace Context standardizes propagation of trace identifiers and flags across distributed system boundaries.

    The W3C Recommendation defines `traceparent` and `tracestate` fields and processing behavior for distributed tracing.

    Primary source · standard · checked Aug 26, 2026

    Limit: Propagation creates correlation, not workflow identity, authorization, causality proof, or durable history.

  3. Durable workflow observability should model execution relationships separately from the lifetime of any one trace.

    The relationship map below preserves delegation and resume semantics while allowing traces to remain bounded.

    Signal Studio author framework · reviewed Aug 26, 2026

    Limit: The map requires consistent instrumentation across orchestrators, queues, agent runtimes, and effect adapters.

Limitations

Tracing backends differ in link queries, long-lived traces, sampling, and retention. Message loss, clock skew, retries, and reparenting can create incomplete graphs. The relationship map supports investigation but does not prove semantic causality between agents.

FAQ

Should a workflow keep one trace ID for several days?
Usually keep traces bounded to meaningful execution episodes and join them with stable workflow/checkpoint identities and links. Extremely long traces can be expensive, hard to sample, and awkward across retention boundaries.
Is every delegated agent a child span?
A synchronous nested call may be. Queued, parallel, resumed, or independently scheduled work is often better represented with a new trace plus a delegation or message link.

Continue within AI agent observability, or use one of these adjacent diagnostics:

Editorial QA: automated native-English, structure, source-presence, and link checks completed . This record is not an independent expert endorsement. Review boundary.