# Sampling calculator

See how many traces and how much data you keep at a sampling rate, with or without keeping every error.

## How it works

Head sampling keeps a fixed share of traces decided at the start. Keeping every error trace as well, through tail sampling, costs little because errors are rare.

```
kept = traces × (errors + (1 − errors) × rate)
```

## Questions

### What rate should I start with?

10% is a common start for busy services. Keep 100% for low-traffic or critical paths.

### Does sampling break metrics?

Request metrics should come from metrics, not counted spans, so they stay exact.

## Related tools

- [Traceparent parser & generator](https://powertraces.com/tools/traceparent)
- [OpenTelemetry setup generator](https://powertraces.com/tools/opentelemetry-setup)
- [Collector config builder](https://powertraces.com/tools/collector-config)
- [OTLP JSON validator](https://powertraces.com/tools/otlp-json-validator)

[All tools](https://powertraces.com/tools)
