Analytics

Describe what the sample leaves out

Editorial edition · 16 November 2026

The idea

Sampling reduces collection and processing work, but it also changes what can be inferred. A sample is useful only when its selection process is understood. Conveniently available records may systematically miss the conditions that matter most.

Design choice

Record the sampling method and rate with the data. Consider whether failures or rare events need separate treatment. If the rate changes, keep enough metadata to avoid interpreting a collection change as a business trend.

Worked example

A trace collector samples ordinary requests but retains a defined set of error traces. Analysts distinguish those streams instead of using the combined collection as an unbiased error-rate estimate.

Before you ship

  • Document the selection mechanism
  • Preserve sampling metadata
  • Inspect rare and missing cases

Examples are illustrative. Adapt the checks to your own environment.

Further reading

OpenTelemetry metrics

Search the library