How do you get accurate RED metrics if traces are sampled?
IntermediateProductionTracing & Sampling
Answer
Generate metrics before sampling. The OTel Collector spanmetrics connector (or Tempo's metrics-generator, Datadog's trace metrics) computes request counts, errors and latency histograms from 100% of spans, then traces are sampled. Alternatively rely on app-level Prometheus metrics for RED and use traces only for debugging. Never compute rates from a sampled trace store.
More on Tracing & Sampling
In production, when do you pick tail-based over head-based trace sampling, and what does it cost you?BeginnerHow do you configure head sampling correctly in OpenTelemetry?BeginnerHow do you set up tail sampling in the OpenTelemetry Collector?IntermediateWhy does tail sampling need a load-balancing tier, and how do you build it?AdvancedHow do you combine head and tail sampling in a high-traffic system?AdvancedWhat should you put in span attributes and what should you avoid?Beginner