
What a whole trace looks like
A trace is a tree of spans. The root span is the span with no parent. With its root, a trace appears in the Traces list and in trace counts, and trace-level evaluators run on it.
Find your route
The Splunk AO Python SDK (splunk-ao) exports OpenTelemetry (OTLP) traces. Your own OpenTelemetry setup uses the same endpoint as the SDK.
- Self-hosted. Send OTLP traces to
<api-url>/otel/v1/traces. Replace<api-url>with the API URL of your deployment, for examplehttps://api.<domain>. - SaaS. Send OTLP traces to
https://ingest.<realm>.observability.splunkcloud.com/v2/trace/otlp. Replace<realm>with your Splunk Observability Cloud realm, for exampleus0.
Self-hosted
Your deployment stores each valid span you send, whether or not it is an AI span. It reads prompts and responses from span events and from span attributes. The trace appears in the Traces list when its root span arrives, in the same request or a later one. Evaluators expect a complete, unbroken trace. These traces are not evaluated, and their metrics show code 2019:- A trace without its root span. Its spans are stored, but the trace is not listed.
- A trace with a gap: a span whose parent never arrives. The trace is evaluated if the missing span arrives later.
- A trace with a span under an LLM or control span. A control span records an Agent Control action.
Splunk Agent Observability (SaaS)
On SaaS, traces enter through Splunk Observability Cloud. It sends all spans to Splunk APM. It sends only the spans that look like AI spans to Agent Observability, and drops the rest. For how this hand-off affects delivery and timing, see SaaS Ingestion Behavior.Which spans are kept
A span is kept when the span, or the service that sent it, carries one of these attributes:gen_ai.operation.namemcp.method.namesplunk_ao.project.namesplunk_ao.logstream.name
gen_ai.operation.name or mcp.method.name on the span itself. A kept trace can lose its plain spans, often its root. When the root is dropped, Agent Observability adds a stand-in root:

The Splunk AO Python SDK
The SDK setsgen_ai.operation.name on the LLM, tool, retriever, workflow, agent and control spans it records. A trace with at least one of those spans normally arrives whole.
Your own OpenTelemetry setup
The root of your trace is often a plain web request. Splunk Observability Cloud drops it, so the trace gets a stand-in root that carries none of your root span’s data. Spans that carry only OpenInference attributes are not kept. Turn on thegen_ai.* attributes. See the OpenInference guidance and the OpenTelemetry integration page.
How incomplete traces are handled
- No root span. A stand-in root is added about 10 minutes after the trace goes quiet. The trace then appears in the Traces list and is evaluated.
- A gap in the middle. A span’s parent never arrives. The trace is evaluated.
- A span under an LLM or control span. The trace is evaluated. That span and the spans under it are not applicable (code 2033).
- Too large to evaluate. A trace with more than 1,000 spans is not evaluated (code 2036).
- Too large a session. A session with more than 1,000 traces, or with more than 512 MiB of records, is not evaluated (code 2040). Its traces and spans are still evaluated.
- A late span. The whole trace is evaluated again.