Prompt
What should I use for tail-based sampling in microservices?
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
For microservices, the best default for tail-based sampling is usually:
Use OpenTelemetry Collector with tail sampling
It’s the most common, vendor-neutral choice and works well across distributed services.
Why it’s a good fit
- Centralized sampling decisions after seeing the full trace
- Can keep slow, error, and high-latency traces
- Works with many languages and frameworks via OpenTelemetry
- Easy to route to different backends like Jaeger, Tempo, Honeycomb, Datadog, etc.
Typical setup
- Instrument services with OpenTelemetry SDKs
- Send traces to an OpenTelemetry Collector
- Use the Collector’s tail_sampling processor to decide which traces to keep
- Export sampled traces to your tracing backend
Good sampling policies for microservices
Common tail-sampling rules include:
- Keep all traces with errors
- Keep traces above a latency threshold
- Keep traces for specific important endpoints
- Keep a small percentage of normal traffic for baseline visibility
Example use case
- Keep 100% of:
- errors
- traces over 2s
- checkout/login/payment paths
- Keep 1–5% of everything else
If you’re choosing a platform
- OpenTelemetry Collector: best general-purpose choice
- Grafana Tempo + OTel Collector: good if you use Grafana stack
- Honeycomb: strong for high-cardinality analysis and trace exploration
- Datadog/New Relic: convenient if you already use their observability suite
Practical recommendation
If you’re starting fresh:
Use OpenTelemetry + Collector tail sampling, and keep:
- all errors
- all slow traces
- a small random sample of normal traffic
If you want, I can also give you:
- a sample OTel Collector tail_sampling config, or
- recommendations based on your stack (Kubernetes, Jaeger, Tempo, Datadog, etc.).