Skip to main content

Grafana Cloud vs OpenTelemetry

If you're using Grafana Cloud which already has everything needed for observability, it's worth mentioning some things related to OTel and Prometheus.

Let's imagine a scenario where we have Prometheus outside the Kubernetes cluster, but managed by Grafana Cloud.

Grafana Agent​

Grafana Agent is the piece that bridges your local environment and the Prometheus hosted in Grafana Cloud.

Prometheus in Grafana Cloud is a Prometheus managed by Grafana and doesn't scrape directly from your local applications, requiring something to send the metrics to it.

Grafana Agent acts as a local collector that scrapes metrics locally (Node Exporter, applications, etc.) and sends (remote write) these metrics to Prometheus in Grafana Cloud, but it can also collect logs for Grafana Loki and traces for Grafana Tempo (Grafana's Jaeger).

Node Exporter --→ Grafana Agent --→ Prometheus (Grafana Cloud)
Application -------↗ ↓
Loki/Tempo (Grafana Cloud)

The main difference from a local Prometheus:

  • Local Prometheus: scrapes directly from targets
  • Grafana Agent: scrapes and sends to Prometheus Cloud

Grafana Agent is lighter than a complete Prometheus because:

  • It doesn't store metrics locally
  • It doesn't have a query interface
  • It focuses only on collecting and sending

Grafana Agent can work together with OpenTelemetry in two ways:

  • Grafana Agent Flow (newer):
    • Has native support for the OpenTelemetry (OTLP) protocol
    • Can act as an OpenTelemetry Collector because it implements the same basic functionalities as a Collector, including:
      • Data reception: Supports the OTLP (OpenTelemetry Protocol) protocol being able to receive metrics, logs, and traces and uses the same default ports (4317 for gRPC, 4318 for HTTP)
      • Processing: Can batch data, filter, and transform.
      • Export: Can send to different backends, supports different protocols, and can route data.

The main difference is that Grafana Agent is optimized for the Grafana Cloud ecosystem, while OpenTelemetry Collector is more generic and supports more backends and configurations.