Head-based vs tail-based trace sampling
WHAT IT TESTS: trace sampling trade-offs. OUTLINE: head decides up front (cheap, may miss rare errors); tail decides after the trace completes (catches errors and slow traces but needs buffering). RED FLAG: claiming one is universally better.
WHAT IT TESTS: whether you can reason about cost versus completeness in tracing. ANSWER OUTLINE: head-based sampling decides at trace start, usually a fixed probability, propagated so all spans agree; it is cheap and stateless but blindly drops most error and slow traces. Tail-based sampling buffers all spans of a trace until it finishes, then decides based on latency, errors, or attributes; it captures the interesting traces but needs memory, a collector layer, and full-trace co-location.
Read the original → interview
- #tracing
- #sampling
- #observability
- #opentelemetry
- #scalability
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.