What Every Service Dashboard Needs
The Four Golden Signals (Google SRE):
| Signal | What to Show | Why It Matters |
|---|---|---|
| Latency | P50, P95, P99 over time | User experience |
| Traffic | Requests per second | Load and capacity |
| Errors | Error rate percentage | Reliability |
| Saturation | Resource utilization | Headroom |
Dashboard Layout:
+------------------+------------------+
| Latency | Traffic |
| (line chart) | (line chart) |
+------------------+------------------+
| Errors | Saturation |
| (line chart) | (gauges) |
+------------------+------------------+
| Recent Deployments |
+-------------------------------------+
| Active Alerts |
+-------------------------------------+
Dashboard Implementation:
Panel 1: Latency
- P50 line (green)
- P95 line (yellow)
- P99 line (red)
- SLO threshold line (dashed)
Panel 2: Traffic
- Requests per second
- Compare to same time yesterday (dashed)
Panel 3: Errors
- Error rate percentage
- Breakdown by error type (stacked)
Panel 4: Saturation
- CPU utilization gauge
- Memory utilization gauge
- Connection pool usage
- Queue depth
Contextual Information:
- Recent deployments (vertical lines on charts)
- Active incidents (status banner)
- SLO budget remaining (percentage)
- Link to runbooks
Connecting Logs, Metrics, and Traces
The Investigation Flow:
1. Alert fires: "Error rate > 1%"
2. Check dashboard: Error spike at 10:23
3. Check metrics: Errors from /checkout endpoint
4. Filter traces: Traces for /checkout with errors
5. Find trace: trace_id = abc123
6. View logs: All logs with trace_id = abc123
7. Root cause: Database connection timeout
Enabling Correlation:
# Include trace_id in logs
logger.info(
"checkout_failed",
trace_id=trace_id_var.get(),
user_id=user_id,
error="db_timeout"
)
# Include trace_id in metrics (via exemplars)
request_duration.observe(
duration,
{"trace_id": trace_id_var.get()}
)