Guides for choosing KPIs, building dashboards, setting alerts and analysing incidents, from business outcomes down to the API calls and resources behind them. Tool-agnostic, with a procedure and examples for mapping them onto your tools.
| I want to | Read |
|---|---|
| Pick the KPIs for a product, and the key actions behind them | kpis.md, then fill in kpi-map.yaml |
| Know which API calls a key action depends on, and what a failing call costs | kpis.md: Connecting the levels |
| Instrument a service or the frontend | events.md, Product analytics events |
| Build the dashboards | dashboards.md: The dashboard set |
| Decide what pages us, and set an SLO | alerts.md: What to page on, Choosing the SLO target, Burn-rate alerts |
| Alert on a quiet service | alerts.md: Low traffic |
| Tell if a change is real, or whether a deploy hurt a KPI | analysis.md, Attribution recipe |
| Handle an incident, then review it | incidents.md |
| Cut noisy pages | alerts.md: Reviewing alerts |
| Apply all this to our tools | tools.md, and the tool pages under reference/ |
| Hand the work to an AI agent | ai-agents.md, then point it at AGENTS.md |
| Measure a key action that spans several steps (login with a code, checkout) | flows.md (advanced) |
| Understand logs, spans and metrics | signals.md |
Point the agent at this repo (local path or URL) and tell it to start with AGENTS.md. It routes each task (choose KPIs, design dashboards, set an alert, check whether a change is real, triage an incident) to the sections to read, lists the tools, and sets the rules for applying the guides to a real system. Inside the repo, Claude Code loads it automatically through CLAUDE.md.
Example:
Use the observability guides in ~/dev/metrics: start with ~/dev/metrics/AGENTS.md.
Task: <what you want, e.g. pick the main KPIs for our app and the dashboards to build>.
Fill in templates/kpi-map.yaml from our code and tools; mark unknowns instead of guessing.
Show me the filled map and the plan before building anything.
One question runs through the guide: is the product working for users right now, and if not, what broke and did it matter? Each file is a chapter that opens with its rules, then explains them.
| 1. Signals | What the data is: logs, spans and metrics as events, metric types, RED/USE, OpenTelemetry | signals.md |
| 2. KPIs | What to measure: the KPI tree from business outcomes down to the key actions users take, their API calls and the resources behind them, and how an API call affects a KPI | kpis.md |
| 3. Analysis | How to read the numbers honestly: noise vs real variation, intervals, baselines, and whether a change moved a KPI | analysis.md |
| 4. Dashboards | What to show: the dashboard set, panels, tagging, data sources | dashboards.md |
| 5. Alerts | What to page on: SLO burn rates, thresholds by metric type, low traffic | alerts.md |
| 6. Incidents | When it breaks: triage, runbooks and reviews, at a high level | incidents.md |
| 7. Wide events | Where the data comes from: one wide event per unit of work, metrics as projections of it, sampling, trade-offs | events.md |
| 8. Tools | How to apply it to your tools: inventory, limits, translation, gaps; tool pages under reference/ | tools.md |
| 9. Agents | How an AI agent applies the guides: access, what it may do, what it needs, how it reports | ai-agents.md |
| 10. Journey metrics | Advanced: journey metrics, for key actions that span several steps | flows.md |
- flows.md builds on Google's journey-based SLIs and Evolution of SRE at Google: request counters per step, window sizing, simulations and an OAuth2 example.
- Tool-specific: dated examples of tools.md under
reference/: Datadog (plus APM enrichment for a Java service), Cloudflare Workers, Amplitude, Kubernetes with Prometheus, Google Cloud and AWS CloudWatch. - Templates: templates/kpi-map.yaml: KPIs, key actions, API calls and data sources (multi-step journeys are advanced, see flows.md), to fill in for a real system. templates/tool-map.yaml: one per tool, its building blocks, limits and gaps. templates/post-incident.md: one per incident, its impact, timeline, causes and follow-ups.
Requires uv. From the repo root, uv run src/calc.py --help: burn-rate thresholds, Wilson intervals, z-tests, sample sizes, Poisson tails, spillover. Maintaining the repo (plots, checks): AGENTS.md.