Install OpenTelemetry Collector Contrib on your system. On Ubuntu/Debian:
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]
Get your Grafana Cloud credentials:
https://INSTANCEID.grafana.net)Encode your credentials:
Create systemd override file:
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.
sudo systemctl daemon-reload
sudo systemctl restart otelcol-contrib
sudo systemctl status otelcol-contrib
Check logs for authentication errors:
Traces should export without 401 errors.
After traces are sent successfully:
The grafanacloud connector generates host-hours telemetry automatically when it receives traces, enabling Application Observability billing and access.
The grafanacloud connector sends only host identification (hostname) for billing, not system metrics like CPU, memory, or disk usage.