-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
Right now if a time series didn't exist and comes into existence with value 1, increase() returns 0 since Prometheus doesn't know if the counter actually was increased or simply scraped for the first time.
Where this is technically right, there are use cases where you can't set a timeseries to 0 before the counter gets increased the first time. Think of any kind of low frequency event tracking where you can't expose that a even didn't happen (set to 0) before you saw the event the first time.
Alternatively to changing increase(), we could also add a function to prefix a timeseries with a 0 value. Something that would take a scalar and range vector and return the range vector with the scalar prefix if it has no value.
TomDinunzioMH, adamdougal, shifty11, jessesuen, paveltyk and 7 more
Metadata
Metadata
Assignees
Labels
No labels