
- Each incoming trace is evaluated by the sampler when it first arrives at the collector.
- The sampler deterministically hashes the trace ID together with a seed value.
- The hash result is mapped to a numeric range and compared against a threshold derived from the configured sampling percentage.
- If the hash-derived value falls within the threshold (for example, the
10%bucket), the trace is retained and forwarded to downstream processors or exporters; otherwise the trace is dropped.
Using a deterministic hash of the trace ID plus a stable seed enables consistent sampling decisions across collectors and services. If multiple collectors share the same seed and algorithm, the same trace ID will be sampled consistently.

- 100 traces arrive, including successful, failed, and slow traces (e.g., 1,500 ms).
- A probabilistic sampler configured with
sampling_percentage: 10is applied. - Only ~10 traces will be retained and forwarded; critical errors or slow traces may not be included unless the sampler happens to pick them.
- Use head sampling when you need early, deterministic reduction of telemetry volume to control costs and backend load.
- Avoid relying on head sampling alone when you must guarantee capture of errors or high-latency traces.
- A common approach is to combine a low-rate head sampler with a tail sampler: use head sampling to reduce baseline volume, and use tail-based sampling (which evaluates traces after completion) to ensure retention of error or high-latency traces.
- Another pattern is to apply head sampling for most traffic and selectively increase retention for services or routes known to be critical.
traces pipeline. Adjust sampling_percentage and, if your processor supports it, the hash seed to control deterministic selection behavior.
References and further reading
- OpenTelemetry Collector documentation: https://opentelemetry.io/docs/collector/
- Sampling strategies overview: https://opentelemetry.io/docs/concepts/sampling/