Grafana
Rocketgraph reads your Prometheus metrics and Loki logs through Grafana, with one service account token.
Rocketgraph goes through Grafana's data source proxy, so one Grafana token covers both Prometheus and Loki. It uses the auth your data sources already have.
Connect
- Open Connect and click Grafana under Observability.
- Grafana URL: the address you open Grafana at.
- Service account token: in Grafana, open Administration → Users and access → Service accounts. Add one with the Viewer role, then add a token to it. The Open Grafana service accounts button takes you there.
- Prometheus data source UID: open Connections → Data sources and click your Prometheus source. The UID is the last part of the page's address. The Open Grafana data sources button takes you there.
- Loki data source UID (optional): the same, for Loki. Without it alerts can't show log patterns.
- Click Connect Grafana.
What Rocketgraph reads
All requests go through /api/datasources/proxy/uid/<uid>/ with the Viewer token. Nothing is written.
From Prometheus (/api/v1/query and /api/v1/query_range):
http_server_request_duration_seconds_count, summed byservice_name, for requests.- The same, filtered to
http_response_status_code=~"5..", for errors. http_server_request_duration_seconds_bucketfor p95 latency.- The same metrics by
http_route, for the per-endpoint table. traces_service_graph_request_totalfor the service map, if Tempo's metrics generator writes it.
From Loki (/loki/api/v1/labels and /loki/api/v1/query_range):
- Log line counts per service, and error lines for a service that alerts. Rocketgraph looks for the service in the
service_name,service,app,app_kubernetes_io_name,joborcontainerlabel.
Known limits
- Metric names follow the OpenTelemetry conventions above. If none of them match and you gave a Loki UID, Rocketgraph counts log lines per service instead, and error lines as errors.
- The service map needs Tempo's service graph metrics. Without them there is no map.
- Rocketgraph reads from one observability backend at a time. Connecting Grafana replaces the one you had.
Disconnect
There is no disconnect button for an observability backend. Connecting a different one replaces Grafana. To cut off access, delete the service account token in Grafana.