Enable tail-based sampling for Elastic APM to retain complete, representative traces

domain: elastic.co · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. Enable tail-based sampling on the APM Server (or the Fleet-managed APM integration) via `apm-server.sampling.tail.enabled: true`
  2. Define an ordered list of `policies`, each with a `sample_rate` and optional matchers like `trace.outcome`, `service.name`, or `service.environment`, ending with a catch-all policy
  3. Set `interval` and `ttl` to control how long the APM Server waits to collect all spans of a trace before making a sampling decision (keep `ttl` at least double the `interval`)
  4. Set `storage_limit` to bound local disk usage while trace data is buffered for sampling decisions
  5. Ensure all spans of a given trace can reach the same APM Server (or Collector) cluster, since sampling decisions require seeing the whole trace
  6. Verify sampled and dropped traces in the APM UI match your policy priorities (e.g. errors always kept)

Known gotchas

Related routes

Configure Honeycomb Refinery's EMADynamicSampler for trace-aware tail-based dynamic sampling
docs.honeycomb.io · 5 steps · unrated
Route traces to tail-sampling backends using the loadbalancing exporter
github.com/open-telemetry/opentelemetry-collector-contrib · 6 steps · unrated
Configure the OpenTelemetry Collector tail sampling processor with multiple composite policies for intelligent trace retention
opentelemetry.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans