← ClaudeAtlas

metrics-and-tracinglisted

Use when instrumenting a service or reviewing its telemetry — choosing metrics with RED/USE, metric types, label cardinality, histogram buckets, span design, and context propagation across services. Triggers on adding metrics or traces, OpenTelemetry/Prometheus setup, a dashboard that doesn't answer questions, or cardinality blowing up the metrics backend.
Markuysa/agent-skills · ★ 0 · AI & Automation · score 67
Install: claude install-skill Markuysa/agent-skills
# Metrics and tracing Three signals, three jobs. Confusing them produces expensive telemetry that answers nothing. | Signal | Answers | Cost model | | --- | --- | --- | | Metrics | *Is something wrong, and since when?* | Cheap, aggregated, bounded by cardinality | | Traces | *Where in the call path, and why slow?* | Per-request, sampled | | Logs | *What exactly happened to this one request?* | Expensive per event ([[structured-logging]]) | Start every investigation at metrics, narrow with traces, confirm with logs. If you instrument in the reverse order, you will pay the most for the least. ## What to measure **RED — for anything serving requests** (endpoint, consumer, RPC method): - **Rate** — requests per second - **Errors** — failed requests per second, as a ratio of the rate - **Duration** — latency distribution, as a histogram **USE — for resources** (pool, queue, disk, CPU): - **Utilization** — how busy - **Saturation** — how much queued work is waiting - **Errors** — rejections, timeouts Saturation is the one teams skip and the one that predicts outages. Connection pool wait time, queue depth, and worker-pool queue length tell you an hour ahead of the incident; utilization tells you during it. Instrument the **user-visible journey**, not only per-service internals — a checkout that fails because one of seven services is down is one broken journey, and the graph nobody has is the one that shows it. See [[slo-and-error-budgets]]. ## Metric types - **Counter**