In production, when do you pick tail-based over head-based trace sampling, and what does it cost you?

BeginnerProductionTracing & Sampling
Answer
  • Head sampling: the decision is made at the start of the trace (in the SDK of the first service) and propagated downstream. Cheap and simple, but blind: it keeps 10% of all traces, including boring ones, and may drop the one rare error.
  • Tail sampling: spans are buffered in a collector until the trace is complete, then a policy decides (keep errors, slow traces, 5% of the rest). Much better signal but needs memory and all spans of a trace in the same collector.
All Monitoring & Observability questions Roadmap: Logging & tracing

More on Tracing & Sampling