Lesson 8 of 9 · 24m
Dashboard Engineering: Build for Decisions, Not Decoration
Layout, variables, units, legends, and panel design that let an operator move from symptom to cause in minutes rather than spelunking for an hour.
A dashboard is an incident interface. It is not a wall chart for visitors and it is not proof that the system is sophisticated. During a page, it should answer three questions in order: is it real, how bad is it, and where do I look next. If it cannot do that in low light at 3:17 AM, it is decoration.
Structure from symptom to cause
A practical service dashboard has rows in this order:
- Service health: request rate, error ratio, latency percentiles, saturation.
- Dependencies: database, cache, upstreams, queues.
- Resources: CPU, memory, disk, file descriptors, network.
- Debug details: per-instance breakdowns, endpoint tables, tail latency.
The top row should be readable without scrolling. If a deployment hides the error ratio below three rows of beautifully styled CPU panels, the layout is wrong.
Choose the right visualization
- Time series for change over time — almost everything.
- Stat panels for current state, not fourteen unrelated numbers in rainbow colors.
- Heatmaps for latency distributions and density, not as a substitute for understanding buckets.
- Tables for top offenders: endpoints by error rate, instances by restart count.
- Bar gauges sparingly; they consume space quickly and are hard to compare across panels.
Grafana defaults encourage mixed units and vague legends. Fix both.
Queries must preserve meaning
sum by (service) (rate(http_requests_total{service="$service"}[5m]))histogram_quantile(0.95,
sum by (le) (rate(http_request_duration_seconds_bucket{service="$service"}[5m]))
)Label panels with units and transformations: "requests/sec," "errors/sec," "p95 seconds." A legend like {instance="10.1.2.3:9100",pod="api-..."} is not readable. Use legend formatting such as {{instance}} or {{service}}.
Variables are filters, not solutions
Grafana template variables are excellent for service, environment, region, and instance drill-down:
label_values(http_requests_total, service)But a variable with thousands of values means the data model or inventory is already out of control. Do not make operators choose a pod name from a dropdown with 4,000 entries. Give them workload-level views first and instance drill-down only after they have identified a suspect.
Alerts and dashboards should share the same truth
If the alert uses a five-minute error ratio over production traffic, the dashboard should display the same ratio prominently. Otherwise responders spend the first ten minutes reconciling two definitions of "error rate." Consistency beats mathematical sophistication in a crisis.
Dashboards are code
Export dashboards as JSON, review them in version control, and provision them rather than letting production drift by click-ops. Meaningful review questions:
- Does each panel answer an operational question?
- Are units correct?
- Is the time window appropriate?
- Are expensive queries hitting raw high-cardinality data instead of recording rules?
- Can someone unfamiliar with the service use it during an incident?
Field notes
- Red-green color-only states fail colorblind users and dark rooms; use text, thresholds, and panel titles that state meaning.
- A dashboard that takes 20 seconds to load will be ignored in an incident. Precompute heavy expressions.
- Do not show raw counters as primary service health. Rates and ratios are the operator-facing quantities.
- Keep one "drilldown" dashboard per service rather than a thousand-row mega-dashboard. Cognitive load is latency.
Was this lesson helpful?