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
Known 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
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp