
- Lowers network and backend load by discarding unneeded spans early.
- Enables consistent per-process sampling configured without code changes.
- Limited by the local view: SDK sampling decisions occur at span creation time and cannot use eventual trace outcomes.


Sampling at the SDK reduces network and backend load, but it discards data early. If you need sampling decisions based on full-trace results (errors, latency spikes, or aggregated attributes), consider sampling later in the pipeline (the Collector).


Tail sampling improves retention of high-value traces but increases memory and processing needs in the Collector. Plan capacity, timeouts, and resource limits carefully to avoid buffering overload.
- Use SDK or Collector head sampling for lightweight, probabilistic reduction when you only need volume control.
- Use Collector tail sampling when you must make outcome-based decisions (for example, retain all traces that contain errors or unusually high latency).
- Combine approaches: use SDK sampling to reduce baseline volume and tail sampling in the Collector for application-level exceptions or multi-service error patterns.
- OpenTelemetry: https://opentelemetry.io/
- OpenTelemetry Collector: https://opentelemetry.io/docs/collector/
- OTTL (OpenTelemetry Transformation Language) docs: https://opentelemetry.io/docs/collector/processing/transform/