Application Observability with the OpenTelemetry Collector
Grafana Alloy is a vendor-neutral distribution of the OpenTelemetry Collector and the recommended and supported way to send OpenTelemetry data to Grafana Cloud.
Grafana Application Observability has experimental compatibility with the upstream community supported OpenTelemetry Collector.
Before you begin
To set up the OpenTelemetry Collector to send to Grafana Cloud:
The instrumented application sends traces, metrics, and logs to the collector via OTLP. The collector receives data and processes it with defined pipelines.
The traces pipeline receives traces with the otlp receiver and exports them to the Grafana Cloud Tempo with the otlp exporter.
The configuration uses the resourcedetection processor to enrich telemetry data with resource information from the host. Consult the resource detection processor README.md for a list of configuration options.
The metrics pipeline receives traces from the otlp receiver, and applies a transform processor to add deployment.environment, and service.version labels to metrics, and exports metrics to the Grafana Cloud Metrics with the prometheusremotewrite exporter.
The logs pipeline receives logs with the otlp receiver and exports them to the Grafana Cloud Loki with the loki exporter.
The configuration file requires you to set several environmental variables:
Environment Variable
Description
Example
GRAFANA_CLOUD_API_KEY
API key generated above
eyJvSomeLongStringJ9fQ==
GRAFANA_CLOUD_OTLP_ENDPOINT
OTLP endpoint from Grafana Cloud > OpenTelemetry > Configure
https://otlp-endpoint-***.grafana.net/otlp
GRAFANA_CLOUD_INSTANCE_ID
Instance ID from Grafana Cloud > OpenTelemetry > Configure