Lesson 6 · Scale, dashboards & alerting
Grafana
The window onto everything — and why the dashboards live in git, not in a UI.
Your win: explain what Grafana is (and isn't), what a datasource is, and how this repo treats dashboards as code — plus the detail that Grafana queries Thanos, not raw Prometheus.
Grafana is a window, not a store
A common misconception: Grafana stores your metrics. It doesn't. Grafana is a visualization layer — it queries other systems (its datasources) and draws dashboards.1 The data lives in Prometheus/Thanos (metrics) and Jaeger (traces); Grafana just makes it legible.
thanos-query-frontend:9090, isDefault: true),
Prometheus, and Jaeger. The surprising part is which is
default: Thanos, not Prometheus. That follows directly from Lesson
2/5 — Prometheus keeps only 2h, so a dashboard that wants any history must go through
Thanos Query. When you open a Grafana graph here, you're querying Thanos's global, long-term
view by default.
Dashboards as code
You can click dashboards together in Grafana's UI — but then they live only in a database, undiffable and unreviewed. This repo does the opposite: dashboards are provisioned from files in git.
dashboards/feature-services/backend-<svc>-gen.json
— and there's a grafonnet/jsonnet builder library at
internal/golibs/grafanabuilder/. So a dashboard change is a PR
(reviewable, diffable, versioned), not a click someone forgets they made. Same discipline as
Helm charts and Terraform: the config is code.
RequestAuthentication (Course 4's edge, applied to dashboards). The prod Grafana
also runs the grafana-oncall-app plugin — the bridge to Lesson 7's paging.
Grafana — dashboards & data sources
What a datasource is, provisioning dashboards from files, and panel basics.
Check yourself (from memory)
Q1. Grafana's role is to…
Q2. Grafana's default metrics datasource here is…
Q3. This repo's dashboards are…
grafana/values.yaml:549-571): THANOS
(thanos-query-frontend:9090, isDefault), Prometheus, Jaeger.
Default = THANOS because Prometheus keeps only 2h. DASHBOARDS AS CODE: file-provisioned JSON
from grafana/dashboards/** (values.yaml:661-880), per-service ones
GENERATED (backend-<svc>-gen.json), grafonnet builder in
golibs/grafanabuilder — a dashboard change is a reviewable PR, not a UI click.
Grafana sits behind the monitoring Istio gateway (JWT) + runs the grafana-oncall-app plugin.1. Grafana — Data sources; in-repo platforms/monitoring/grafana/values.yaml:549-880.