Page 6 of 8~112 min topic

Production monitoring lab

Add observability and tests

Metrics for alert_precision on game-day ≥ 0.9 and scrape_up == 1 must distinguish bad input from component failure for SRE watching error budget during a model bump.

~14 min this pageObservability

1Learn the idea

Read

Golden signals for this system

Instrument Prometheus+Grafana board for AI answer API golden signals so SRE watching error budget during a model bump can answer: demand, errors, latency/age, saturation. Emit fields needed by alert_precision on game-day ≥ 0.9 and scrape_up == 1 with bounded labels. Sample successful high-volume traces; keep errors and rollout transitions denser within policy.

Read

Alert path worth paging

Define at least one alert that would fire for MON-TENANT-BLIND-9, with a for/pending window that survives deploy blips. Missing scrape or missing revision labels must not look like health. Include a trace/log example id format you will actually search.

Read

Implementation artifact

{"panel":"p95_ttft","query":"histogram_quantile(0.95, sum(rate(ttft_seconds_bucket[5m])) by (le))"}

Read

Tests for telemetry

Add a unit/integration check that metrics increment on the happy path and on the dashboard averages hide tenant Acme 40% error rate branch. Store machine-readable output in CI artifacts when practical.

Read

Stage depth

Cardinality discipline: tenant and revision are usually enough; raw question text is not a label. Exemplars or trace links beat screenshots alone when debugging MON-TENANT-BLIND-9. Define who owns alert fatigue review. If you export to a vendor, record retention and access. Synthetic probes should use non-sensitive fixtures and still exercise GET /metrics. Practice the query you will type at 2am once, while calm.

Read

Field notes for `production-monitoring-lab` / `observability`

Document the exact PromQL or log query in the runbook stub for this service. Verify histograms have buckets around your SLO target. Add a canary synthetic check that exercises the oracle path every few minutes in staging. Confirm that PII redaction happens before export. Track build/version as a label on the golden signals. Delete noisy debug logs before they become accidental product dependencies. In this chapter the product is Prometheus+Grafana board for AI answer API golden signals, the human stakeholder is SRE watching error budget during a model bump, and the incident id you design against is MON-TENANT-BLIND-9. Re-state the oracle in your notes — inject 5% 500s for 10m → Alert AnswerErrorBurn fires; recovery clears within 15m — and keep the invariant visible: alerts require multi-window evidence; missing scrape ≠ healthy silence. Track alert_precision on game-day ≥ 0.9 and scrape_up == 1 as the scoreboard. Surface under change control: GET /metrics. If you only have forty minutes, finish the fixture for dashboard averages hide tenant Acme 40% error rate before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.

Go deeper

Before you start

Why this matters

Name the dashboard row or log line SRE watching error budget during a model bump opens first during MON-TENANT-BLIND-9. It must include a correlation id and a bounded label from alert_precision on game-day ≥ 0.9 and scrape_up == 1. If telemetry is missing, write whether you promote, hold, or roll back — and why hold is the default.

In the wild

See how this idea shows up as a product and a company — then come back to the lesson. Skills transfer across vendors.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Can you jump from alert to MON-TENANT-BLIND-9-class evidence?
2. Do labels stay low-cardinality?
3. Is missing telemetry treated as hold?

All responses are required.