metrics-expositionlisted
Install: claude install-skill konradcinkusz/architecture-standards
# Metrics exposition: bounded cardinality, and truncation you can see
**Read [`references/METRICS-EXPOSITION.md`](references/METRICS-EXPOSITION.md) before applying any of this.**
That file is the standard; everything below it is a summary to help you decide
whether this skill applies and to check your work afterwards.
Reference-architecture principles: P15.
## What this standard covers
- Every label is a cardinality decision
- High-cardinality dimensions are opt-in and capped
- Export the fact that you truncated
- Emit sums and counts, not averages
- The endpoint is a surface; it can be closed
- Dashboards are provisioned, not clicked
## Failure modes
| Symptom | Cause |
|---|---|
| Prometheus memory climbs steadily and never recovers | A label carrying ids from your data — session, user, request, a path with an id in it. Each distinct value is a permanent series (§1) |
| Monitoring costs more than the service it monitors | The same, discovered on a bill rather than in a graph |
| A panel's numbers are confidently wrong, and nothing looks broken | The exporter truncated and never said so, so the dashboard is rendering a capped view as if it were complete (§3) |
| A rollup across instances disagrees with the per-instance panels | Pre-averaged gauges being averaged again — an average of averages (§4) |
| Cardinality is fine in staging and explodes in production | The high-cardinality view is default-on; staging simply never had enough distinct values to show it (§2) |
| A