▶ Interactive Lab

Trace Sampling Strategies

Head-based vs tail-based; see which interesting traces are kept.

Advertisement
Tail-based keeps the interesting traces (errors, slow). Head-based keeps random ones.

What you're seeing

Head-based: decide at span start. Cheap; misses errors statistically.

Tail-based: collect all spans for a trace, decide at trace completion. Keep all error traces + all slow traces (>p99) + N% normal. Far better debuggability per dollar.

Implemented in OTel Collector tail-sampling processor, Honeycomb refinery.

★ KEY TAKEAWAY
Head-based: keep N% random traces. Tail-based: keep all errors + slow + N%. Tail-based has far better recall for interesting traces.
▶ WHAT TO TRY
  • Switch strategies; generate 50 traces.
  • Tail-based keeps the errors and slow traces; head-based misses them statistically.