Grafana dashboards
Three dashboards, one per signal dlboard exports:
| File | Data source | What it shows |
|---|---|---|
dlboard.json |
Prometheus | The server’s metrics: requests, ingest from training runs, the artifact pipeline, experiment page reads, runs and sign-ins. Each panel’s query uses a metric from telemetry.md, and its description says what a bad value means. |
dlboard-logs.json |
Loki | Error log lines, a “could not start” count, and the server’s log lines. |
dlboard-traces.json |
Tempo | Failed traces and the slowest uploads, store commits, page updates and panel reads, found with TraceQL. |
The metrics dashboard needs a Prometheus that has dlboard’s metrics: either one scraping /metrics (DLBOARD_TELEMETRY_METRICS=prometheus), or one receiving them over OTLP (DLBOARD_TELEMETRY_METRICS=otlp).
The logs dashboard needs DLBOARD_TELEMETRY_LOGS=true, and the traces dashboard needs DLBOARD_TELEMETRY_TRACES=true.
Which server they show
Each dashboard shows one dlboard server, chosen at the top:
- Service: on the metrics dashboard, the Prometheus
job, listed from the jobs that report dlboard’s own metrics: the scrape job’s name, orOTEL_SERVICE_NAME(dlboardby default) when metrics are pushed over OTLP. On the logs and traces dashboards,OTEL_SERVICE_NAMEitself, typed in (dlboardby default). Every query is filtered by it, so another service’shttp_server_*series or log lines never mix in. - Environment (metrics and logs): the
deployment_environmentlabel, for servers that share a service name, a production one and a test one say. Give each its own withOTEL_RESOURCE_ATTRIBUTES=deployment.environment=prod, then make it a label: Prometheus 3 takes it from OTLP withotlp.promote_resource_attributes: [deployment.environment], a scrape adds it as a target label, and Loki makes it a label by default. All shows servers that set none. The traces dashboard has no environment filter, since TraceQL drops a span that lacks the attribute; give those servers different service names instead.
A test (dlboard/serve/telemetry/tests/dashboard_test.py) fails a metrics query that doesn’t filter by both.
Import them
In Grafana: Dashboards → New → Import, upload the file, and pick the data source for its input (Prometheus, Loki or Tempo).
Each file has its own uid (dlboard-overview, dlboard-logs, dlboard-traces), so importing one again replaces the copy already there.
For the logs dashboard’s trace links to work, the Loki data source needs a derived field on trace_id that points at the Tempo data source.
That’s a setting on the data source, not in the dashboard.
Provision them
To have Grafana load them on startup, put them in a folder Grafana reads and add a provider:
# provisioning/dashboards/dlboard.yaml
apiVersion: 1
providers:
- name: dlboard
folder: dlboard
type: file
options:
path: /var/lib/grafana/dashboards/dlboard
Then mount the files into that path.
The data source inputs are filled in by the import step, so a provisioned dashboard needs each ${DS_...} placeholder replaced with that data source’s uid first, or a datasource variable added and the panels pointed at it.
Keeping them up to date
The dashboards are files in this repo, so changes go through review like any other change:
- Edit the dashboard in Grafana, then Export → Export as JSON with “Export for sharing externally” on. That keeps the input block that makes it importable.
- Save the result over the file it came from, and commit.
When a metric, log label or span name is renamed or added, update the panels that use it.
The metrics queries are written against the Prometheus names of the metrics in telemetry.md: dots become underscores, counters end in _total, and the unit is appended (_seconds, _bytes).
Every metrics query matches job=~"$job", deployment_environment=~"$environment" on each series it reads.
The log queries use the service_name and deployment_environment labels and the level and trace_id fields; the trace queries use resource.service.name and span names from the same document.
For the metrics dashboard a test keeps this honest (dlboard/serve/telemetry/tests/dashboard_test.py).
A new metric fails it until it has a row in telemetry.md and a panel in dlboard.json, or an entry in the test’s NOT_CHARTED with the reason it is left off.
A query for a series the server no longer serves fails it too.
The logs and traces dashboards are not checked: their inputs are log fields and span names, not instruments.
Caveats
- Histogram panels use
histogram_quantileoverrate(..._bucket[$__rate_interval]). A low-traffic server shows noisy quantiles; widen the time range if a panel looks jumpy. - The logs stat counts “could not start” lines over the whole selected time range, so it stays red for that range after one failure.
- None of these have been loaded into a Grafana instance from this repo yet. Check each one after importing.