Skip to content

All docs

Tracing

Trace sampling rules

Sampling controls what fraction of traces are kept. Lower sample rates reduce cost; higher rates give more complete visibility.

Head-based sampling

By default, Public Surface samples 10% of traces at the root span. The decision is made once per trace and applies to every span within it.

tracing:
  sampleRate: 0.1

tracing:
  sampleRate: 0.1

tracing:
  sampleRate: 0.1

Per-service overrides

Set a higher sample rate for low-traffic or critical services, such as a payments service, without changing the global default.

tracing:
  sampleRate: 0.1
  overrides:
    payments-api: 1.0

tracing:
  sampleRate: 0.1
  overrides:
    payments-api: 1.0

tracing:
  sampleRate: 0.1
  overrides:
    payments-api: 1.0

Sampling changes can take up to five minutes to propagate to running services.

Create a free website with Framer, the website builder loved by startups, designers and agencies.