Trace anatomy
For an SDK-centered workflow, an end-to-end trace is built from spans, and those spans carry timing information, trace and parent identifiers, plus data specific to the span type.
Continue reading: Tracing a Job Across a Queue Boundary.
Native tracing
The Agents SDK includes tracing as a built-in capability and enables it unless the application changes that setting.
Its automatic instrumentation can create visibility for runner activity, model interactions, agents, language-model generation, function tools, safety checks, handoffs, transcription, speech, and developer-created events.
The SDK provides global controls through environment and code configuration, and a run can also receive its own tracing setting through RunConfig. If a hierarchy is too noisy, automatic task and turn spans can be omitted while preserving several lower-level operational spans.
Export timing and retention constraints
The standard batch exporter works asynchronously: it sends accumulated trace data on a periodic schedule or after its queue reaches its configured threshold, then attempts a final send during shutdown.
A worker can therefore finish a unit of work before its trace appears in the dashboard. For long-lived processes, the documented pattern is to call flush_traces() after leaving the trace context when immediate end-of-unit delivery is needed.
The documentation states that this tracing is not available to organizations operating under a Zero Data Retention policy.
Continue reading: Removing Sensitive Values Before Exporting Telemetry.
OpenTelemetry GenAI attributes
OpenTelemetry’s GenAI conventions describe common attribute concepts for agent description, agent ID, agent name, agent version, conversation ID, operation name, incoming messages, and outgoing messages.
The supplied OpenTelemetry reference also says that its listed GenAI attributes have been relocated to the GenAI semantic-conventions repository, so implementation work should check the current repository and version.
The supplied material does not provide a ready-made mapping from SDK span fields to every OpenTelemetry attribute.
Custom processor destinations
The SDK supports custom trace processors that may replace its usual destination or add another destination.
Limits of the available material
The supplied excerpts do not include a complete SDK-to-OpenTelemetry field map, and the configuration excerpt stops as its websocket-transport discussion begins.
Accordingly, this article offers an implementation planning framework, not a compatibility certification or a security assessment.
Which operational decision does the default hierarchy support without additional span data? The documented defaults establish runner, task, turn, agent, generation, function, guardrail, and handoff boundaries, but actionability should be tested against competing explanations rather than inferred from nesting alone. For a slow or failed workflow, require the trace to distinguish at least: time spent in generation versus a function call; a handoff that was attempted versus one that did not occur; and a guardrail termination versus an ordinary execution failure. Record the trace ID, parent-child path, outcome/error classification, and duration for each boundary, then verify that an on-call responder can choose an owner or next action from those fields. If task and turn spans are omitted to reduce noise, confirm that the retained lower-level spans still preserve that diagnostic path; otherwise the hierarchy detects activity but does not explain the failure. The SDK documents both the default span types and the option to disable task and turn spans while retaining lower-level operational spans: Agents SDK tracing documentation.