concept Operations & procedures
Distributed tracing propagation and sampling bias
A missing span is not a missing call. Follow four service hops to see how lost parent context changes which spans link to a trace, while sampling changes which spans you can inspect.
What it means
A distributed trace shows work that was both linked to the same request and retained for inspection. It is not a list of every call that happened. A service can lose the context that connects its work to an earlier call, and a sampling decision can leave out work even when the connection is intact.
A span describes an operation. When one service calls another, it can pass along trace context identifying the trace and the calling span. The receiving service can then place its span in the same trace with the calling span as its parent. That relationship is what lets you follow a request from one service to the next.
Try it
Simulation: Start with four sequential service hops, one modeled span per hop, and scenario evidence set to provided. The first hop with lost parent context is 3, and both sampling policies are set to keep. All four calls happen by assumption. Hops 1 and 2 link to the original trace; hops 3 and 4 do not. Of the two linked spans, two are collected and both are recorded. The simulation does not say whether the other two hops are recorded elsewhere.
Distributed tracing propagation and sampling bias
Explain why a trace graph can be incomplete due to context loss or sampling
Original trace contains only hops before context loss; downstream may form a separate trace.
Call path
- Hop 1Linked to original context
- Hop 2Linked to original context
- Hop 3Outside original context
- Hop 4Outside original context
Sampling decisions
- Head decisionkeep
- Tail decisionkeep
- Recorded2
- Outcomepartial
These counts are distinct stages, not a direct measure of all live spans. An unknown recording outcome must not be shown as zero.
Evaluated inputs
- Required scenario evidence
- provided
- Sequential service hops
- 4 count
- First hop with lost parent context (0=none)
- 3 count
- Head policy at trace source
- keep
- Tail policy on collected spans
- keep
One original trace, one context break, stipulated call count and head/tail policy decisions on original trace only. No claim about recording of separate trace, sampling probabilities, span storage, actual telemetry or reconstructing missing calls.
About this model
The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.
Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.
Change only the first hop with lost parent context from 3 to 0 (no break). Now all four spans link, all four are collected, and all four are recorded. The call count did not increase. Passing context across the boundary between hops 2 and 3 made the downstream work visible in the original trace.
Use Reset to restore the four-hop example with the break at hop 3 and both policies set to keep. The hop count must be a whole number from 1 to 10. For a context break, choose a hop from 2 through the last hop, or use 0 for none. Hop 1 starts this trace; it has no earlier hop in the example from which to lose context.
Where a span goes missing
In the starting example, hop 3 still receives a call. What it lacks is the parent context from hop 2. Even if hop 3 starts a new trace and passes its context to hop 4, that would link their work to each other, not back to hop 2. Two recorded spans out of four calls therefore does not mean the sampler kept half: here it kept every span linked to the original trace.
Sampling answers a different question: of the spans that belong to this trace, which are available to inspect? In the simulation, the head decision is made at the source, before collection. The tail decision applies to the spans the collector actually receives. Keep the break at hop 3 and compare these outcomes for the original trace:
| Head policy | Tail policy | Spans collected | Spans recorded |
|---|---|---|---|
| Keep | Keep | 2 | 2 |
| Drop | Keep (not evaluated) | 0 | 0 |
| Keep | Drop | 2 | 0 |
| Keep | Unknown | 2 | Unknown |
The middle two rows look identical if you see only the final count. The collection count tells them apart: in one case nothing reached the tail stage; in the other, two spans reached it and were dropped there. An unknown tail decision is different from either drop: you know two spans arrived, but not how many were retained. If the required scenario evidence itself is missing, the simulation gives no counts at all.
Remove the propagation break and keep both sampling decisions at keep: four calls become four linked and recorded fixture records. Leave propagation intact but drop at the tail: linked and collected remain four while recorded becomes zero. A missing trace can therefore arise after successful context propagation. The toy does not observe log correlation or overall metrics coverage.
In practice
If a trace stops at a service boundary, separate three questions. Is there independent evidence that the receiving service handled the call? Did it receive usable parent context? What reached the collector, and what did the sampling policy retain? A service log that covers the request can help with the first question without answering the other two. Use only evidence you are authorized to inspect, and keep credentials and personal data out of tracing fields.
This example follows one original trace through at most one context break. It does not measure live traffic, estimate sampling probabilities, inspect storage, or reconstruct missing calls. When reporting a gap, say “no downstream span is visible in this trace.” To say “no downstream call happened,” you need evidence about the call itself.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Can a downstream service create a new trace?
Yes. Without usable incoming context a downstream service may start a new trace according to its tracing policy. That does not prove that the upstream request never existed.
Does sampling change observed population?
Yes. Head sampling may remove spans before later tail decisions can inspect them. Tail policies select from the data they receive; retained traces need not represent all calls.
Is trace ID a credential?
No. Trace context correlates work across services; its identifiers and propagated metadata can still be sensitive. Keep credentials and personal data out of tracing fields and apply an explicit collection and access policy.
What else helps incident analysis?
Metrics and logs with appropriate correlation and coverage can complement traces. Separate propagation, collection and sampling evidence: missing recorded spans do not establish that calls never occurred. The example does not query any real logs or establish metric coverage.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- W3C Trace Context
traceparent; section 6 (privacy). Trace context has specified identifier formats and privacy considerations. Sampling flags do not guarantee recorded traces; identifiers and propagated metadata can be sensitive.
Checked .
- OpenTelemetry sampling
Sampling. Tail decisions use collected spans; state and capacity costs matter; earlier head sampling can remove data before tail policy.
Checked .