-
Notifications
You must be signed in to change notification settings - Fork 154
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
WIP: Feature/value on counter #96
Conversation
I have tested the change using:
Started as:
With the following log messages being posted:
And this as output:
Leaving out
As expected for backwards compatability. |
Assuming this is something you'll consider merging, I will fix the broken tests, get the build to succeed, and then remove the |
Thanks a lot for the PR! Yes, aligning counter and gauge sounds like a good idea. Please go ahead with fixing the tests. Just a heads up: Some tests in |
Hi, Do you want me to duplicate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few minor comments, apart from that it's looking good.
Yes, that would be good. Sounds like overkill because it's just copy-and-paste, but on the other hand it's an easy addition and it might prevent a bug in the future if someone refactors the counter but forgets that it might have a value. |
I added a test, in 487bcf4. |
3722d12
to
487bcf4
Compare
c674dc0
to
4eddad3
Compare
@fstab will you take a last look at this, and see if you deem it okay, or if there's more you'd like me to do? |
Thanks a lot! |
This PR introduces adds an optional configuration field to the
counter
metric type, namely thevalue
template field, also seen on the gauge.It enables counting up with more than one, a motivating example could be for instance counting time spent or bytes ingested, both of which are monotonically increasing, and thus not will fit as gauges.
The PR has several commits;