-
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
Counter should not have decrement method #176
Comments
I'm sure that I have seen decrements, e.g. https://python-statsd.readthedocs.io/en/latest/statsd.counter.html It's really an alias for increment by a negative number. |
This is an implementation of the statd specification, but I can't see anywhere that a counter can be decrement: otherwise it's a gauge. |
You might be right. "increment" in Statsd is usually used to say that "this thing happened".
If we find an actual use of it in our code then we should keep it. Otherwise, it can go. |
This doesn't particularly concern me. Even if we didn't have a decrement method, you'd still be able to do that because the input type is still a signed number, so you could still do this via the increment method anyway. The integration tests happily work against statsd itself and increment and decrement the counter bucket, so that implies it works, even if it isn't documented. Maybe it's supported as a way to "correct" a mistake in a count before the metric bucket ships somewhere? If we did want to deprecate this, in the immediate term we'd just add an |
The test that shows that this works is here: |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closed automatically due to inactivity. |
Hello,
a counter should always goes up according to the documentation, there's no decrement.
https://github.com/statsd/statsd/blob/master/docs/metric_types.md#counting
Thanks
The text was updated successfully, but these errors were encountered: