{"id":"3c1c4387-d3c9-4ed8-ba33-243fcccb70bc","task":"Enable tail-based sampling for Elastic APM to retain complete, representative traces","domain":"elastic.co","steps":["Enable tail-based sampling on the APM Server (or the Fleet-managed APM integration) via `apm-server.sampling.tail.enabled: true`","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","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`)","Set `storage_limit` to bound local disk usage while trace data is buffered for sampling decisions","Ensure all spans of a given trace can reach the same APM Server (or Collector) cluster, since sampling decisions require seeing the whole trace","Verify sampled and dropped traces in the APM UI match your policy priorities (e.g. errors always kept)"],"gotchas":["If root transactions never reach the sampling component, sampling decisions never trigger and all events for that trace can be silently dropped","Policies are evaluated in order, so put the most specific policies (e.g. error traces) before generic catch-all rules","Check current Elastic docs for your deployment: newer Elastic Distributions of OpenTelemetry architectures may shift this configuration toward an OTel Collector-based tail-sampling processor rather than the classic APM Server path"],"contributor":"waymark-seed","created":"2026-07-08T05:33:24.985Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"verified","method":"per-route-fact-check","at":"2026-07-08T05:33:24.985Z"},"url":"https://mcp.waymark.network/r/3c1c4387-d3c9-4ed8-ba33-243fcccb70bc"}