{
  "id": 20891455,
  "title": "Tail sampling rules in the OpenTelemetry Collector: cost and pitfalls",
  "url": "https://urgent.news/2026/11/20/tail-sampling-rules-in-the-opentelemetry-collector-cost-and-pitfalls",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-20T11:30:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/spanobserver/tail-sampling-rules-in-the-opentelemetry-collector-cost-and-pitfalls-4bd8"
  },
  "original_language": "en",
  "account": "This article explains the importance of tail sampling rules in the OpenTelemetry Collector, and how they can impact memory usage and performance. The tail sampling processor holds spans in memory until a decision is made, which means the number and size of rules directly affect memory consumption. The article provides a step-by-step guide for sizing and tuning these rules, using memory and throughput measurements to determine the appropriate values for decision_wait, num_traces, and maximum_trace_size_bytes.\n\nThree types of sampling rules are discussed: exclusions, safety nets, and the cost ceiling. Exclusions drop noise spans, safety nets keep important traces, and the cost ceiling limits the number of spans per second. The article also covers combining rules and the nuances of using the probabilistic policy, as well as potential production pitfalls such as late spans and the impact of multiple Collector instances.\n\nLastly, the article lists key metrics to monitor and suggests re-reading the documentation with each Collector upgrade to ensure the tail sampling rules continue to function as intended.",
  "summary": "Your second-tier Collector keeps restarting, or your trace bill refuses to fall: either way, it is your tail sampling rules that need another look, well before you touch the traffic. Every rule you add changes what the processor holds in memory, what it discards and what reaches the backend. This is not a configuration detail. It is a budget you have to arbitrate. This article starts from the…",
  "key_points": [
    "Tail sampling rules impact memory usage and performance in OpenTelemetry Collector",
    "Three types of sampling rules: exclusions, safety nets, and cost ceiling",
    "Monitor key metrics to ensure tail sampling rules function properly"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}