-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not reporting a gauge value of zero #5
Comments
yeah, not exactly sure how to manage that differently though. Easiest obviously is to simply let it be a configuration parameter whether 0 is reported or not, although probably you want a low idle timeout when doing that so you don't report the 0 each time... Do you have any opinion? |
This is affecting us too. I think the problem is that 0 is a completely valid value for a gauge or a counter (e.g. "number of active sessions" can easily be zero and is definitely distinct from1) and zero samples in a period is legit for a histrogram. Shouldn't idleness be dealt with by setting |
0 is a valid value for a gauge or a counter (e.g. "number of active sessions" can easily be zero and that state is distinct from is distinct 1) and zero samples in a period is legit for a histogram over an interval. For gauges we should also not reset to zero on each render, but we should continue to do so for counters. Suppression of idle metrics should be done using `StatsdBuilder::idle_timeout`. Fixes dialtone#5
0 is a valid value for a gauge or a counter (e.g. "number of active sessions" can easily be zero and that state is distinct from is distinct 1) and zero samples in a period is legit for a histogram over an interval. For gauges we should also not reset to zero on each render, but we should continue to do so for counters. Suppression of idle metrics should be done using `StatsdBuilder::idle_timeout`. Fixes dialtone#5
There seems to be no exported metric when explicitly reporting a gauge value of
0
, for example withmetrics::gauge!("foo", 0 as f64)
.I noticed there were a lot of "if 0, continue" conditions added in 85bd93b, maybe using zero to indicate idle is breaking explicit zero values?
The text was updated successfully, but these errors were encountered: