Commit ffac51f0 authored by Julius Volz's avatar Julius Volz

Merge pull request #92 from stapelberg/sum-rate

document caveat about combining sum and rate
parents c09a8b07 ac5bfe76
...@@ -184,6 +184,11 @@ rate(http_requests_total{job="api-server"}[5m]) ...@@ -184,6 +184,11 @@ rate(http_requests_total{job="api-server"}[5m])
`rate` should only be used with counters. `rate` should only be used with counters.
Note that when combining `rate()` with an aggregation operator (e.g. `sum()`)
or a function aggregating over time (any function ending in `_over_time`),
always take a `rate()` first, then aggregate. Otherwise `rate()` cannot detect
counter resets when your target restarts.
## `resets()` ## `resets()`
For each input time series, `resets(v range-vector)` returns the number of For each input time series, `resets(v range-vector)` returns the number of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment