Skip to main content

OpenTelemetry Collector

The OpenTelemetry Collector is responsible for gathering, processing, and exporting telemetry data, including traces, metrics, and logs. It receives telemetry data from your services, processes it, and sends it to backends for storage and visualization. The OpenTelemetry acts as a bridge between your services and observability backends like Grafana Tempo for traces and Prometheus for metrics.

tip

You can read more about OpenTelemetry Coloector in the OpenTelemetry documentation

Example: Collecting Traces

To collect distributed traces from your services and send them to Grafana Tempo for visualization, you need to configure the OpenTelemetry Collector to receive and export traces. Here’s an example configuration:

tracing:
enabled: true
url: http://infra-monitoring-opentelemetry-collector.infra-services.svc.cluster.local:4317

Sampling in OpenTelemetry

Sampling controls which traces are collected and exported to manage data volume. Common strategies include: head sampling (deciding at the start of a trace) and tail sampling (deciding after the trace completes). This helps balance observability with resource efficiency.