Skip to main content
The Distributed Tracing Example and Distributed Tracing with OpenTelemetry guides cover setup. This page covers behavior: how traces and sessions assemble from spans, what happens when a span’s parent is missing, and how metric computation behaves as data arrives over time. How spans reach Splunk Agent Observability (the records API, OpenTelemetry, or a SaaS ingestion path) is covered separately, on the “How data reaches Splunk Agent Observability” page.

How traces, spans, and sessions are assembled

A trace ID identifies a trace. Every span in a trace shares its trace ID, regardless of which service created the span. Splunk Agent Observability groups spans by trace ID and builds the parent-child hierarchy from each span’s reference to its parent. A session groups multiple related traces, such as the turns of a conversation. Context propagation carries the trace ID and the current span’s ID across a network call. This is what lets a downstream service’s spans attach to the trace an upstream service started. Both the native SDK mode and the OpenTelemetry W3C traceparent header propagate this context. See the setup guides above for which fits your stack.

Why a trace’s name matches its first span’s name

OpenTelemetry has no “trace” entity, only spans. When you log over OTel, Splunk Agent Observability builds the trace record from whichever span has no declared parent, and copies that span’s name as the trace’s display name. The span that became the trace still exists separately as its own span underneath it. The same name appears twice in the tree: once as the trace, and once as that span’s own node nested beneath it. This is not a duplication bug. The trace and the span are two different records that share a name because the trace borrowed it. A resolved trace tree, showing the trace header "root" with a nested child span also named "root," each correctly nested beneath it
Logging more than one parentless span under the same trace ID is not supported. Only one builds the trace. The SDK’s context propagation guarantees exactly one parentless span per trace; you can only hit this by hand-constructing OpenTelemetry payloads directly, bypassing the SDK.

Out-of-order and late-arriving spans

Spans can arrive in any order. A child span can arrive before or after its parent. Splunk Agent Observability reconciles the hierarchy by trace ID as spans arrive and attaches a later-arriving span to its place in the tree automatically. This requires no action on your part, except in one case: a span whose declared parent hasn’t arrived yet, covered next.

When a parent span never arrives

A span can declare a parent that doesn’t exist, either because it hasn’t arrived yet or because it never will (a bug in your instrumentation, a span that was never sent). This differs from a span with no parent at all (covered above): here the span declares a parent, but that parent is unresolvable. Splunk Agent Observability doesn’t drop this span. What you see depends on whether the trace has a real root:
  • The trace has a real root: some other span with no declared parent, promoted into the trace as described above. Every orphaned span, no matter how many, and even if several share the same missing parent, becomes a direct child of that root. An orphaned span looks identical to a legitimate child; there’s no visual indication of the issue. If a span’s declared parent is itself present in the trace, even if that parent is also an orphan, the chain nests normally under it. This describes the tree view. Whether the trace’s metrics compute depends on your deployment — see Why metrics can show as “not computed” below.
  • No real root exists: the tree view shows a placeholder Partial trace node with a Partial badge. Hovering over it shows “This trace is still being assembled.” It holds the trace’s orphaned spans as siblings. Each orphan keeps its own correctly nested descendants; only the point where a parent is missing breaks the chain. A Partial trace placeholder holding four sibling branches (a, d, f, and i), each with its own correctly nested children, while their shared parent is still missing This trace has no trace record, so it won’t appear in flat or tabular views. Only the tree view synthesizes a placeholder. The same trace in a flat view reports 0 traces despite having spans: A flat view reporting Sessions 1, Traces 0, Spans 8 for a trace that has no root yet
  • This self-heals, including retroactively: if the orphan’s actual parent arrives later with no parent of its own, it’s promoted into the trace, and the Partial trace placeholder becomes a real trace. The same name-duplication applies.
The console flags a misdirected span only when its entire trace has no root. Check your context propagation setup directly if you suspect spans are losing their intended parent.

LLM-typed spans are leaves

A span typed llm (see how span type is determined for OTel logging) is a leaf. Nothing nests under it. A span whose declared parent is llm-typed is dropped from the tree instead. This matters only if your instrumentation nests spans under an LLM call. If it happens, it cascades: a dropped child’s own children are dropped too, down the whole chain. The dropped spans still exist. They’re excluded from the tree view only, and remain visible in flat or tabular views.

There’s no “trace closed” moment

A trace or session has no fixed close point. A span can attach to a trace minutes or hours after the trace was first logged, and the trace picks it up. No action seals a trace off from future spans. Splunk Agent Observability doesn’t wait for a trace to be “done” before computing metrics. Any write that touches a trace (a new span, an update to an existing one) triggers metric computation on the trace’s current tree. If more spans arrive, the trigger fires again and recomputes against the fuller tree.

Why metrics can show as “not computed”

Whether a gap — a missing root, or a span whose parent never arrives — blocks metric computation depends on your deployment. Self-hosted: any gap, whether it’s a missing root or a missing parent deeper in the tree, blocks computation for the whole trace. Metrics show not computed and carry error code 2019, which identifies the structurally incomplete trace. This self-heals once the missing span arrives — the next write triggers computation again against the fuller tree. If it never arrives, metrics stay not computed indefinitely. SaaS: a trace with a real root computes and recomputes normally even with a gap deeper in the tree. A trace with no root gets a stand-in root automatically, about 10 minutes after it goes quiet, and is evaluated from there — so the “indefinitely” case above applies only to self-hosted. This is not an error and needs no action from you either way.

Session metric timing

Session-level metrics finish later than trace and span metrics, for two reasons:
  1. Metrics that evaluate the session as a whole wait for a fixed 2-minute idle window after the session’s last write, so an active conversation isn’t scored mid-turn. A session can still receive new traces after this fires; it’s picked up again on the next idle window.
  2. Metrics that aggregate trace-level results into a session-level summary can only compute once the underlying trace-level metrics exist. They’re downstream of trace-level computation, not blocked by any session-closing signal.
Trace- and span-level metrics have no idle window. Every write triggers metric computation immediately. The 2-minute delay applies only to session-level metrics. Sessions, like traces, stay open to new activity indefinitely. There’s no “session complete” state.

Later arrivals replace results, not duplicate them

A late-arriving span’s recomputation replaces the previous metric values for that trace or span. You will not see two entries, an old one and a new one, for the same record. The UI and API always show the most recently computed value.
  • Don’t design instrumentation around a trace or session being permanently “closed.” Metric computation happens, and can happen again, in response to new data. It is not a one-time event to wait for.
  • If a trace’s metrics look incomplete or stuck as “not computed,” check for a span missing a parent before assuming the trace failed to log. See the orphan-span guidance above.