How do you size and run the OpenTelemetry Collector in production?
IntermediateProductionTracing & Sampling
Answer
- Run agents (DaemonSet or sidecar) for local collection and a gateway Deployment for processing and export.
- Always use
memory_limiterfirst in the pipeline andbatchnear the end. - Use the persistent sending queue (
file_storageextension) for durability. - Set GOMEMLIMIT around 80% of the container limit.
- Autoscale the gateway on CPU and monitor
otelcol_exporter_send_failed_spans,otelcol_processor_refused_spansand queue size.
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?AdvancedHow do you get accurate RED metrics if traces are sampled?Intermediate