Observability Practical By Samson Tanimawo, PhD Published Feb 20, 2026 4 min read

The Trace Sampling Decision: Cost Per Decision

Each sampling decision has a cost. Head sampling is cheap; tail sampling is expensive. The math that picks the right approach.

Decision at trace start. Cheap: random number, threshold compare.

Cost: nearly zero. Quality: drops error/slow traces probabilistically.

Tail sampling

Decision after full trace. Expensive: buffer all spans, evaluate rules, decide retention.

Cost: collector memory + CPU. Quality: keeps error/slow traces deterministically.

Hybrid

Head sample 10% of healthy traces. Tail sample 100% of error/slow traces.

Best of both. Most production stacks converge here.