- Generate realistic application traffic to produce observable metrics
- Create a Grafana dashboard and save it as a reusable template
- Build panels to measure Traffic, Errors, and Latency
- Organize panels into rows grouped by the four golden signals
When deriving per-second rates from Prometheus counters, prefer
rate() for standard windows and irate() for very short windows. Use a consistent rate interval such as [$__rate_interval] or a fixed window like [5m] across your dashboard to avoid confusing spikes.Generate traffic in the application
Before building panels, configure the Order Processing UI simulator so you have live data:- Set async request rate to
Low traffic - Set processing latency to
Faster processing(if available) - Keep simulated error rate near
5%
Grafana access and dashboard creation
Log in to Grafana (lab default credentials):- Dashboards → New → Add new panel
- Later, open Dashboard settings to name and describe the dashboard:
- Name:
Order Processing - Four Golden Signals - Description:
Production monitoring dashboard for Order Processing application
- Name:
1) Traffic — Total application traffic (frontend + backend)
Goal: Answer “How much load is my system handling?” Panel: “Total application traffic” — combine frontend and backend request rates. PromQL (use Query A and Query B):- Panel type: Time series
- Tooltip → Mode: All
- Tooltip → Values Sort Order: Descending
- Legend → Mode: List
- Legend → Values: Last (current value)
- Query A → Options → Legend: Frontend (req/s)
- Query B → Options → Legend: Backend (req/s)
- Standard options → Unit: Throughput / requests/sec (reqps)
- Graph styles → Fill opacity: 20
2) Traffic — Frontend traffic broken down by endpoint
Goal: Identify hotspots by frontend path. Panel: “Frontend traffic by endpoint” PromQL:- Panel type: Time series
- Tooltip → Mode: All
- Tooltip → Values Sort Order: Descending
- Legend → Mode: Table (or List)
- Legend → Values: Last, Max
- Standard options → Unit: Throughput / requests/sec (reqps)
- Graph styles → Line width: 2
- Use a visible window of 5–30 minutes to find patterns.
- Showing both
lastandmaxhelps surface intermittent spikes.
3) Traffic — Backend traffic broken down by endpoint
Panel: “Backend traffic by endpoint” — similar to the frontend breakdown, grouping by the backend’s target label. PromQL:- Panel type: Time series
- Tooltip → Mode: All
- Tooltip → Values Sort Order: Descending
- Legend → Mode: Table
- Legend → Values: Last, Max
- Standard options → Unit: Throughput / requests/sec (reqps)
- Graph styles → Line width: 2
4) Infrastructure — Pod network traffic (TX / RX)
Panel: “Pod network traffic” — monitor per-pod network transmit and receive rates converted to kilobytes/sec. PromQL:- Panel type: Time series
- Legend → Mode: Table
- Legend → Values: Last, Max
- Standard options → Unit: Data Rate / kilobytes/sec
- Graph styles → Fill opacity: 10
- Query A → Options → Legend: Tx - {{pod}}
- Query B → Options → Legend: Rx - {{pod}}
pod=~"order-.*" regex filters application pods. Update namespace and regex to match your cluster.
5) Errors — Overall error rate (percentage)
Panel: “Error Rate (%)” — show percent of requests returning 5xx (or 4xx/5xx as required). PromQL (backend 5xx percentage):- Panel type: Time series
- Standard options → Unit: Percent (0–100)
- Display → Decimals: 2 (optional)
- Axes → Min: 0
- Tooltip → Mode: All
- Add thresholds for visual urgency (e.g., Green 0%, Yellow 1%, Red 5%)

6) Errors — Error count by service (absolute errors per second)
Panel: “Errors per second by service” — absolute failed requests show user impact. PromQL examples (count 4xx/5xx per service):- Panel type: Time series
- Query A → Legend: Frontend errors (req/s)
- Query B → Legend: Backend errors (req/s)
- Standard options → Unit: Throughput / requests/sec
- Axes → Min: 0
- Add thresholds (example: Yellow 0.5 req/s, Red 2 req/s)
7) Errors — HTTP status code distribution
Panel: “HTTP Status Code Distribution” — breakdown of response codes to identify error classes. PromQL examples:- Panel type: Time series (or Table for discrete counts)
- Tooltip → Mode: All
- Legend → Mode: Table
- Legend → Values: Last, Max
- Standard options → Unit: Throughput / requests/sec
Frontend - {{status_code}} to make series self-explanatory.
8) Latency — Request latency percentiles (P50, P95, P99)
Panel: “Backend request latency percentiles” — capture typical and tail latencies using histogram quantiles. PromQL (using histogram buckets):- Panel type: Time series
- Query A Legend: p50 (median)
- Query B Legend: p95
- Query C Legend: p99
- Tooltip → Mode: All
- Tooltip → Values Sort Order: Descending
- Standard options → Unit: Time / milliseconds (ms) — convert if your histogram is in seconds
- Graph styles → Line width: 2
Histogram buckets are often exported in seconds (e.g.,
http_server_duration_seconds_bucket). Verify unit semantics in your metrics and set the panel unit (seconds → milliseconds) or multiply the query appropriately to display consistent units.9) Latency — Median response time by endpoint
Panel: “Backend Median Response Time by Endpoint” — drill into which endpoints are slower. PromQL:- Panel type: Time series
- Tooltip → Mode: All
- Legend → Mode: Table
- Legend → Values: Last, Max
- Standard options → Unit: Time / milliseconds (ms)
- Graph styles → Fill opacity: 15
path vs http_target), update the group by label to match your metric set.

Organize the dashboard into rows (Golden Signals)
Group related panels into collapsible rows for quick troubleshooting. Suggested structure:- Row: Golden Signal 1 — Traffic
- Total application traffic
- Frontend traffic by endpoint
- Backend traffic by endpoint
- Pod network traffic
- Row: Golden Signal 2 — Errors
- Error Rate (%)
- Errors per second by service
- HTTP status code distribution
- Row: Golden Signal 3 — Latency
- Backend request latency percentiles (P50, P95, P99)
- Backend median response time by endpoint
Save the dashboard after organizing rows and panels.


Final recommendations
- Keep label names and job names consistent across queries. Use templating (dashboard variables) to reuse this dashboard across environments or services.
- Use
[$__rate_interval]or a fixed5mwindow consistently to avoid confusing artefacts. - Prefer percent error for alerts and absolute error counts for impact analysis.
- Verify metric names and label keys in your application or exporter (e.g.,
status_codevshttp_status_code,pathvshttp_target) and update queries accordingly. - Consider adding alert rules based on the percent error and tail latency percentiles (p95/p99) aligned with your SLOs.