← ClaudeAtlas

monitoring-patternslisted

Application monitoring patterns covering Prometheus metrics (Counter, Gauge, Histogram, Summary), the prometheus-client Python library, metric naming conventions, labels, and health check endpoints. Use whenever a Python project instruments metrics, uses prometheus-client, or the user asks about Prometheus, metrics, monitoring, health checks, or observability, even if "Prometheus" is not mentioned by name.
ku5ic/dotfiles · ★ 0 · DevOps & Infrastructure · score 72
Install: claude install-skill ku5ic/dotfiles
# Monitoring Patterns Review checklist for Prometheus instrumentation. Constructor signatures are in the prometheus-client docs; this file is the naming rules, the cardinality trap, and what to flag. ## Picking a metric type | Type | Use for | Goes down? | | --------- | ----------------------------------------------------------------------------------- | ---------- | | Counter | Requests, errors, bytes - totals that only increase | No | | Gauge | Queue depth, active connections, memory - current state | Yes | | Histogram | Latency, payload size - distribution matters | No | | Summary | Avoid; quantiles are computed client-side and cannot be aggregated across instances | No | Default to Histogram over Summary. Review the default buckets (.005 through 10, tuned for HTTP latency) against the operation's real distribution rather than accepting them. ## Naming `namespace_subsystem_name_unit`, snake_case, base units only. - Counters end in `_total`: `myapp_errors_total` - `_seconds` not `_milliseconds`, `_bytes` not `_megabytes` - Name what is measured, not the measurement: `http_request_duration_seconds`, not `http_request_time` - Always set `namespace=` - unprefixed names collide across apps in a shared Prometheus ## Exposing - Background worker or CLI wit