{"id":"7b84030a-7255-4a8c-b978-4d2c0211a7a9","task":"Configure tail sampling in the OpenTelemetry Collector to keep only high-value traces","domain":"opentelemetry.io","steps":["Add the tailsampling processor to your Collector pipeline in the processors section of the config","Set decision_wait (e.g., 10s) to control how long the Collector buffers spans before making a sampling decision; ensure this is longer than your slowest service's trace duration","Define policies in the tail_sampling processor: combine latency (threshold_ms), status_code (ERROR), probabilistic (sampling_percentage), and composite policies using the and policy type","Route all OTLP receivers through the tailsampling processor before the exporter so that span data is held in memory during the decision window","In a multi-Collector deployment use the loadbalancing exporter in a gateway tier to route all spans of a given trace_id to the same Collector instance running tail sampling","Monitor Collector memory usage; set memory_limiter processor before tailsampling to emit a backpressure signal and drop data before OOM"],"gotchas":["Tail sampling requires all spans of a trace to arrive at the same Collector instance; without a trace-ID-based load balancer in front, sampling decisions will be made on incomplete traces","A long decision_wait increases memory consumption linearly with trace volume; benchmark your peak TPS and trace size before choosing this value","The composite policy evaluates sub-policies in order and short-circuits; verify policy order matches your intent by checking the tailsampling_sampling_decision metric"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","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":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/7b84030a-7255-4a8c-b978-4d2c0211a7a9"}