Counting with Prometheus
summary
Prometheus counters are monotonically increasing values exported (never reset except on process restart) so rate() computes per-second throughput by extrapolating edge samples, handling counter resets, and averaging across scrapes; increase() is just rate()seconds. Extrapolation rules avoid overcounting short-lived series, irate() uses the last two points for microbursts, and the Java Dropwizard meter is ~6x slower than a Prometheus counter in benchmarks. Recommended defaults: 1 minute for most metrics, 15s or lower for high-resolution debugging, and keep label cardinality near 10 per metric*.
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:47Architecture
- 1:38Counting... to the Extreme
- 2:20Counters and Gauges
- 2:55Events are key
- 4:07Counter Reset. Normal Operation
- 4:32Resetting Count Problems
- 5:19Counter Reset. Failed Transfer
- 6:33Exponential Moving Average. Normal Operation
- 7:42Approach #2 Exponential moving average Problems
- 9:48Graphite's summarize and non-aligned data
- 10:33Expressive Power
- 13:12Prometheus Counters: Rate
- 13:58Prometheus Counters: Resets
- 14:55Prometheus Counters: Missed scrapes
- 15:08Prometheus Counters: Alignment
- 18:37rate() extrapolation
- 21:40Problem: Lag
- 23:10Client Implications
- 25:35Other performance considerations
- 27:14Best Practices
- 28:44irate(): The other rate function
- 30:06irate(). Failed Transfer
- 30:25Steps and rate durations
- 31:24Compound Types: Summary
- 32:00Compound Types: Histogram
- 33:10Resources








