Menu
Documentationbreadcrumb arrow OpenTelemetrybreadcrumb arrow Set up OpenTelemetry Collector

Set up OpenTelemetry Collector

An OpenTelemetry Collector distribution provides a way to receive, process, and export telemetry data independent of vendor.

For production observability, Grafana Labs recommends Grafana Alloy. Alloy is an OpenTelemetry Collector distribution from Grafana Labs. It enables correlation between infrastructure and application observability.

Telemetry data pipelines with an OpenTelemetry Collector distribution offer these benefits:

  1. Cost control: A Collector aggregates and drops telemetry data and sends relevant data to reduce costs
  2. Scalability and reliability: A Collector buffers and retries sending data, so you don’t lose data during connection issues
  3. Flexibility: A Collector simplifies configuration and manages data pipelines through enrichment, transformation, redaction, and routing

This document details the following ways to use an OpenTelemetry Collector with Grafana Labs products:

  • Grafana Alloy: Use the Grafana Labs-supported OpenTelemetry Collector distribution, recommended for most production environments.
  • Grafana Alloy for Kubernetes: Deploy Grafana Alloy in Kubernetes using the Grafana Kubernetes Monitoring Helm chart.
  • OpenTelemetry Collector (Upstream): Use the community-supported upstream OpenTelemetry Collector.
  • Kubernetes OpenTelemetry Operator: Manage deployments of the upstream OpenTelemetry Collector on Kubernetes.

Architecture diagram for Application Observability showing data flow from applications through an OpenTelemetry Collector to Grafana Cloud

Prerequisites

Before you set up an OpenTelemetry Collector distribution, ensure you have the following:

  • An application or service generating telemetry data, or a data source you want to collect from
  • A destination for your telemetry data, such as Grafana Cloud or a self-managed Grafana observability stack (Grafana Mimir, Grafana Loki, Grafana Tempo)
  • Network connectivity for the Collector to receive data from sources and send data to destinations

Grafana Labs recommends setting up OpenTelemetry components, including instrumentation and an OpenTelemetry Collector distribution, using one of the Grafana Cloud onboarding workflows. These opinionated guides make it easy to get started and include all the binaries, configuration, and connection parameters you need to set up OpenTelemetry for Grafana Cloud.

Grafana Alloy

Grafana Labs maintains and supports Grafana Alloy, which packages various upstream OpenTelemetry Collector components and Prometheus exporters. Alloy provides stability, support, and integration with Grafana Cloud, Application Observability, and other Grafana Labs products.

Refer to the OpenTelemetry Collector, Alloy documentation for the way to send OpenTelemetry data to Grafana Cloud and use Application Observability in production.

Grafana Alloy for Kubernetes

If you deploy your application in Kubernetes, use the Grafana Kubernetes Monitoring helm chart. This chart supports Kubernetes Monitoring, Grafana Cloud, and Application Observability.

Refer to Kubernetes Monitoring with Grafana Alloy to get started.

OpenTelemetry Collector

The OpenTelemetry project maintainers and the Cloud Native Computing Foundation maintain the upstream OpenTelemetry Collector. This is a community-supported project.

Refer to the OpenTelemetry Collector documentation to use the upstream OpenTelemetry Collector with Grafana Labs products.

Kubernetes OpenTelemetry Operator

If you use the upstream Collector and deploy your application in Kubernetes, you can use the OpenTelemetry Operator to instrument your application and send telemetry data to Grafana Cloud without modifying your services.

Next steps