How do I trace an OpenAI Agents SDK run?

Tracing is on by default: every Runner.run() call is wrapped in one trace, and that trace holds a span for each agent, each model call, each tool call, each handoff, and each guardrail check, sent to OpenAI’s own dashboard unless you redirect them. There’s no built-in OpenTelemetry exporter, so reaching a different backend means writing or installing a trace processor: add_trace_processor() sends a copy alongside the default export, set_trace_processors() replaces it outright, and OPENAI_AGENTS_DISABLE_TRACING=1 turns tracing off entirely.

The handoff and guardrail spans are worth grading on their own rather than folding into whatever the agent finally says. A handoff span records the exact moment control moved from one agent to another and what went with it, which is where multi-agent handoffs actually break. A guardrail span records that a check ran and what it decided, a separate fact from the model’s output that’s worth tracking as its own rate.

sources

keep reading

More on this.

Two ways to run Tessary.

Tessary is an open-source agent reliability platform. Cloud and self-hosted run the same workflow on the OpenTelemetry traces your agent already emits.

Tessary Cloud

We host it for you. Send your first trace with nothing to deploy and no model key.

what's includedper organization
traces
10,000 per calendar month
stored trace data
1 GB
retention
30 days
model credit
$10, one-time, for triage and root-cause analysis
credit card
not required

Self-hosted Tessary

Run the open-source code on your own infrastructure with one command. Add your own model key for triage and root-cause analysis.

Self-host Tessary for me by following https://github.com/tessaryai/tessary/blob/main/setup.md

docker compose -f oci://docker.io/tessaryai/tessary:compose up -d -y