Implement UpDownCounter instrument#796
Merged
codeboten merged 9 commits intoopen-telemetry:masterfrom Jun 10, 2020
Merged
Conversation
ocelotl
reviewed
Jun 9, 2020
Contributor
ocelotl
left a comment
There was a problem hiding this comment.
Just a question regarding a test
lzchen
reviewed
Jun 9, 2020
lzchen
requested changes
Jun 9, 2020
Contributor
lzchen
left a comment
There was a problem hiding this comment.
Using SumAggregator for both makes sense to me. You'd probably need to create BoundUpDownCounter if you are going to add additional validation.
lzchen
reviewed
Jun 10, 2020
lzchen
approved these changes
Jun 10, 2020
Contributor
lzchen
left a comment
There was a problem hiding this comment.
LGTM. Just a quick nit and wondering if you are going to rename the SumAggregator.
Member
Author
|
EDIT: actually I'll do it in another PR to keep the noise down on this change |
Co-authored-by: Yusuke Tsutsumi <yusuke@tsutsumi.io>
ocelotl
approved these changes
Jun 10, 2020
This was referenced Jun 11, 2020
codeboten
pushed a commit
to codeboten/opentelemetry-python
that referenced
this pull request
Jun 11, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #754. Very similar to
Counter, I just copied the classes and renamed.Things that could be implemented differently:
UpDownCountercould 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->SumAggregatorand use it in both. ThenSumAggregatorcan be used in the views API.Let me know what you think!