Skip to main content

OTEL-063: tail_sampling without groupbytrace

Severity: warn (advisory)

Rule Details

tail_sampling makes sampling decisions based on the whole trace — error spans, latency outliers, root span attributes. It can only do that when it sees every span for a trace in the same batch. groupbytrace is the processor responsible for buffering spans by trace ID and handing complete traces over to the sampler. Running tail_sampling alone means it sees partial traces and makes inconsistent decisions — some spans sampled in, some dropped, same trace.

This rule fires when a pipeline contains tail_sampling but not groupbytrace.

Options

This rule has no options.

Examples

Avoid
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, tail_sampling, batch] # no groupbytrace
exporters: [otlp/backend]
Prefer
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, groupbytrace, tail_sampling, batch]
exporters: [otlp/backend]

When Not To Use It

A head-sampling-only pipeline that happens to include a degenerate tail_sampling policy (rare). In practice, if you use tail_sampling you need groupbytrace.

  • OTEL-043 — batch before tail_sampling/groupbytrace
  • OTEL-064 — both probabilistic_sampler and tail_sampling in same pipeline

Version

Available since augur v0.1.0.

Further Reading

Resources