Prompt
Why are traces missing spans between services?
Latest observation
Oct 19, 2026
OpenAI APIWeb search: off
If a distributed trace is “missing spans between services,” it usually means one of a few things is breaking the parent/child linkage as the request crosses service boundaries.
Common causes:
-
Trace context isn’t being propagated
- The outgoing request from Service A doesn’t carry trace headers (for example
traceparent,tracestate,x-b3-*, etc.). - Service B starts a new trace instead of joining the existing one.
- The outgoing request from Service A doesn’t carry trace headers (for example
-
Instrumentations are incomplete or mismatched
- One service is instrumented, but the client/server libraries used for the hop are not.
- Different services use different propagators or tracing formats.
-
Async or message-based hops aren’t instrumented
- Queues, pub/sub, Kafka, SQS, background jobs, etc. need explicit context propagation.
- Without it, spans often appear disconnected or absent.
-
Sampling drops some spans
- The trace may be sampled in one service and dropped in another, especially with head-based sampling.
- Tail-based sampling or inconsistent sampler config can make traces look incomplete.
-
Exporter/collector issues
- Spans are created but not exported due to:
- collector misconfiguration
- network failure
- auth issues
- timeouts
- buffer overflows
- One service may export spans reliably while another silently drops them.
- Spans are created but not exported due to:
-
Service boundary isn’t actually instrumented as a span
- The “between services” portion is just network I/O, and you only see spans if both the client and server sides are instrumented.
- If one side is missing, the trace may show a gap.
-
Clock skew or timestamp problems
- Bad system clocks can make spans appear out of order or create apparent gaps.
-
Context is lost in custom code
- Manual thread handling, executors, reactive pipelines, or goroutines/futures can drop the active context if not propagated.
How to debug quickly:
- Verify request headers are present on the outbound call.
- Confirm both client and server instrumentation are enabled.
- Check that all services use the same propagator.
- Look for span export errors in logs.
- Compare sampler settings across services.
- Test with a known synchronous request path first.
If you want, I can help you diagnose it for a specific stack, like OpenTelemetry + Java/Spring, Node.js, Python, .NET, Kafka, or Istio/Envoy.