Observability / Editorial solution guide
Traces split or lose expected child spans
Distinguish propagation gaps, context activation, intentional links, sampling, export loss, and query scope before declaring that downstream work never happened.
Read-only knowledge base · No public comments
Recognize the symptoms
An upstream request appears in one trace while the downstream operation starts another, or an expected storage span is absent. Batch work may appear disconnected even though processing succeeds. Concurrent tasks can occasionally carry another request’s identity, making a trace look complete but misleading.
Understand the likely causes
- Context may not be injected, forwarded, extracted, or activated at the actual boundary. Unsupported library versions, task-local context leaks, deliberate span links, head sampling, tail-sampling grouping, late spans, export failure, and restrictive search filters can create similar visible symptoms. A diagram alone cannot identify which occurred.
Record the expected relationship first
Identify the exact protocol or execution boundary: synchronous HTTP, a new task, callback, message, or multi-input batch. State whether the supported instrumentation should use parentage, a new trace with links, or another documented relationship. Fix service, environment, time range, and instrumentation versions. Use synthetic identifiers in shared reports. Do not copy authentication headers or real message payloads. The goal is to test one expected relationship, not to force every operation into a single visually continuous tree.
Inspect propagation separately from recording
At each authorized boundary, distinguish carried context from active execution context and exported spans. A request can carry a valid context while its spans are not retained. The offline fixture classifies three known synthetic cases: no carrier, carrier not activated, and active context without a recorded example. It does not parse W3C headers or test an SDK. In a real isolated integration, use the platform’s supported propagators and inspect forwarding rules rather than manually inventing header parsing or trusting client-supplied identity.
def diagnose(carried, active, recorded):
if not carried:
return "inspect-injection-forwarding-extraction"
if not active:
return "inspect-context-activation"
if not recorded:
return "inspect-sampling-recording-export"
return "inspect-relationship-and-query"
print(diagnose(False, False, False))
print(diagnose(True, False, False))
print(diagnose(True, True, False))
inspect-injection-forwarding-extraction
inspect-context-activation
inspect-sampling-recording-export
The fixture classifies declared states only. It verifies no header syntax, context manager, concurrent runtime, or telemetry transport.
Check lifetime and concurrency boundaries
New tasks and callbacks may require supported capture and scoped activation, followed by correct restoration of prior context. A global mutable context can leak one request’s identity into another. Messaging can preserve a producer relationship after the HTTP request ends, and batches may need links to multiple inputs. Review the exact messaging convention and library integration. Retries and redelivery can create several attempts for one logical event, so separate attempt identity from business deduplication. A trace identifier is not an exactly-once guarantee or an authorization claim.
Review policy, export, and visibility
Compare head and tail sampling policies, routing to stateful decision points, late-span limits, export errors, and backend retention. Check whether a search selects the right service and time and whether access correctly limits visibility. Do not bypass authorization to complete a trace. A retained parent with missing children can have several causes, and a later sampler cannot restore spans never exported. Choose the narrow correction supported by evidence, preserve version assumptions, and keep incomplete coverage visible while investigating.
Verify the fix
In an authorized isolated integration, verify supported header or message propagation, activation and restoration, expected parent or link relationships, concurrency isolation, and recording policy. Compare exact synthetic IDs where appropriate without treating them as credentials. Report which runtime and library versions were exercised. The local classifier alone proves none of those integration properties.
Keep it from recurring
- Keep propagation and recording contracts documented separately, test async boundaries and mixed instrumentation, and version sampling and schema changes. Use safe correlation fields with appropriate access. Maintain trace coverage notes so responders know that absence limits interpretation and does not automatically mean the downstream action never occurred.