-
Notifications
You must be signed in to change notification settings - Fork 657
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
Implement UpDownCounter instrument #796
Conversation
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.
Just a question regarding a test
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.
Using SumAggregator
for both makes sense to me. You'd probably need to create BoundUpDownCounter
if you are going to add additional validation.
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.
LGTM. Just a quick nit and wondering if you are going to rename the SumAggregator.
EDIT: actually I'll do it in another PR to keep the noise down on this change |
Closes #754. Very similar to
Counter
, I just copied the classes and renamed.Things that could be implemented differently:
UpDownCounter
could subclassCounter
, but I think that is a confusing way to do it.BoundCounter
, I could copy it to a new classBoundUpDownCounter
.CounterAggregator
, I could create aUpDownCounterAggregator
. I think it would make more sense to renameCounterAggregator
->SumAggregator
and use it in both. ThenSumAggregator
can be used in the views API.Let me know what you think!