Schedule a demo

Grafana Cloud setup

Prerequisites

Install OpenTelemetry Collector Contrib on your system. On Ubuntu/Debian:

sudo apt-get install otelcol-contrib

Configuration

Create /etc/otelcol-contrib/config.yaml:

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:

connectors:
  spanmetrics:
  grafanacloud:
    host_identifiers: ["host.name"]

exporters:
  debug:
    verbosity: detailed
  otlphttp:
    endpoint: ${Zato_Grafana_Cloud_OTLP_Endpoint}
    headers:
      Authorization: Basic ${Zato_Grafana_Cloud_Auth}

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug, otlphttp, spanmetrics, grafanacloud]
    metrics:
      receivers: [otlp, spanmetrics]
      processors: [batch]
      exporters: [debug, otlphttp]
    metrics/grafanacloud:
      receivers: [grafanacloud]
      processors: [batch]
      exporters: [otlphttp]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug, otlphttp]
  extensions: [health_check, pprof, zpages]

Environment variables

Get your Grafana Cloud credentials:

  1. Log in to Grafana Cloud
  2. Find your instance ID from the URL (format: https://INSTANCEID.grafana.net)
  3. Create an access token under "Access Policies" in your account settings

Encode your credentials:

echo -n "instanceID:token" | base64

Create systemd override file:

sudo systemctl edit otelcol-contrib

Add environment variables:

[Service]
Environment="Zato_Grafana_Cloud_OTLP_Endpoint=https://otlp-gateway-prod-us-east-0.grafana.net/otlp"
Environment="Zato_Grafana_Cloud_Auth=your-base64-encoded-credentials"

Replace your-base64-encoded-credentials with the output from the base64 command above.

Save and exit.

Start the collector

sudo systemctl daemon-reload
sudo systemctl restart otelcol-contrib
sudo systemctl status otelcol-contrib

Verify operation

Check logs for authentication errors:

sudo journalctl -u otelcol-contrib -f

Traces should export without 401 errors.

Grafana Cloud Application Observability

After traces are sent successfully:

  1. Go to your Grafana Cloud instance
  2. Navigate to Application Observability in the menu
  3. Services appear after the first traces are received

The grafanacloud connector generates host-hours telemetry automatically when it receives traces, enabling Application Observability billing and access.

Host-hours telemetry

The grafanacloud connector sends only host identification (hostname) for billing, not system metrics like CPU, memory, or disk usage.