You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# HELP uploads_documentuploads
# TYPE uploads_documentuploads gauge
uploads_documentuploads{planid="9aa6dd9e8e7axxxxx1414621fe9b3249",userid="xxxxxxx-5a2f-47fe-b2f1-865b14661aa1",domain="gmail.com",clientid="5e9d38cc0c7771fe1b6e7bd4bbd5bedd"} 0
for a counter created and incremented with:
_options = new CounterOptions { Name = name, MeasurementUnit = unit, Context = context };
Why was it decided that counters should have a decrement method? What are the use cases for this? Are there any scenarios where I actually want to count backwards?
A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart. [..] Do not use a counter to expose a value that can decrease. For example, do not use a counter for the number of currently running processes; instead use a gauge.
An external application (such as Prometheus) can easily detect when the counter has been reset (next value < previous value) and accumulate the values accordingly.
However, this condition does not work if a decrement was performed programatically. Not to be confused with Reset (at program restart).
This is probably the reason why gauge is exported as TYPE. Unfortunately, evaluations for COUNTER do not work with GAUGE type.
The export text is:
for a counter created and incremented with:
Not that I'm comparing :) but prometheus.net exports a counter as Type counter
Seems broken
The text was updated successfully, but these errors were encountered: