← Lessons

quiz vs the machine

Gold1460

System Design

Adaptive Sampling

Letting the sampling rate move automatically so you keep useful data under changing load.

5 min read · core · beat Gold to climb

The Limit of Fixed Rates

A fixed sample rate is a poor compromise. Set it high and a traffic spike floods your backend. Set it low and rare endpoints almost never get sampled. Adaptive sampling adjusts the rate automatically.

How It Adapts

The idea is to target a budget, such as a number of traces per second, rather than a fixed percentage:

  • Per operation rates: a busy endpoint gets a low rate, a rare endpoint a high one, so both stay represented.
  • Feedback loops: the sampler watches recent throughput and nudges rates to hit the budget.
  • Guaranteed minimums: low traffic paths get a floor so they are never invisible.

Why It Helps

The result is steady backend cost with fair coverage. Hot paths do not drown out the rare ones, and a sudden surge does not blow the budget.

Key idea

Adaptive sampling tunes the rate per operation toward a trace budget, keeping cost stable and rare endpoints visible under changing load.

Check yourself

Answer to earn rating on the learn ladder.

1. What does adaptive sampling target instead of a fixed percentage?

2. Why give rare endpoints a guaranteed minimum rate?