Head-based vs tail-based sampling: what is the difference?

IntermediateConceptTracing & OpenTelemetry
Answer
  • Head-based: the decision is made when the root span starts (e.g. keep 10%) and propagated in the sampled flag. Cheap and simple, but blind: it drops 90% of errors and slow requests too.
  • Tail-based: all spans are buffered until the trace is complete (or a timeout), then a policy decides: keep all errors, all traces over 1 s, and 5% of the rest. Much better signal, but it needs memory, a central Collector tier and trace-ID-aware routing.
Head Tail
Where SDK Collector gateway
Cost Very low Buffering memory
Keeps all errors No Yes

Common production combination: modest head sampling in the SDK (or 100% for low-volume services) plus tail sampling in the gateway.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing & OpenTelemetry