Add MinMaxSumCount and Gauge Aggregators#181
Merged
Merged
Conversation
:) haha, it's a pun
reyang
reviewed
Jul 18, 2020
reyang
reviewed
Jul 18, 2020
reyang
reviewed
Jul 18, 2020
reyang
reviewed
Jul 18, 2020
Also changed enum in ctor to InstrumentKind to support new version of the Aggregator class in PR #178
This is to keep up with the update Aggregator class in PR #178
Accidental copy-paste of InstrumentKind arg meant the test was not actually conducting a bad merge but rather, a perfectly valid merge.
Accidental copy-paste of InstrumentKind arg meant the test was not actually conducting a bad merge but rather, a perfectly valid merge.
Member
|
This PR has conflicts that need to be resolved before merge. |
Member
|
@Brandon-Kimberly please look into the CI failures. |
Contributor
Author
I just updated my code to ensure that the format test passes. The others are currently failing because this code is dependent on code in PR #178, namely the base Aggregator class. |
Needed to add check to see if the count is equal to 0 and, if so, set the min and max to the first value seen.
Codecov Report
@@ Coverage Diff @@
## master #181 +/- ##
==========================================
+ Coverage 93.75% 93.84% +0.09%
==========================================
Files 104 109 +5
Lines 3249 3512 +263
==========================================
+ Hits 3046 3296 +250
- Misses 203 216 +13
|
Contributor
Author
|
@reyang I believe this PR is ready to merge :) |
ziqizh
pushed a commit
to ziqizh/opentelemetry-cpp
that referenced
this pull request
Jul 31, 2020
ziqizh
pushed a commit
to ziqizh/opentelemetry-cpp
that referenced
this pull request
Jul 31, 2020
GerHobbelt
pushed a commit
to GerHobbelt/opentelemetry-cpp
that referenced
this pull request
Jun 17, 2025
…s-create-or-update-comment-digest Update peter-evans/create-or-update-comment digest to 54ad810
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.
This PR builds out SDK support for the MinMaxSumCount and Gauge Aggregators which combine updates to metric instruments in meaningful values. Each aggregator stores exportable values in a vector format for ease of use further down the metrics data pipeline. All aggregators are derived from a base Aggregator abstract class which holds functions and data relevant to all aggregators. Additional data structures, such as a vector for histogram boundaries, are added on a case by case basis. Aggregators are dependent on the Metric Instruments API (pending approval in PR #161) and will not compile without those files. Additionally, these aggregators depend on the base Aggregator interface in PR #178.
Also included are tests for each aggregator which validate the correctness of aggregation in both single-threaded and concurrent situations.
Note: We templated aggregators to support a wider array of scalar types. This templating prevents us from using out of line declarations as we normally would. As a result, we left all implementation code in the header file. If there are any suggestions to remedy this we will gladly make the change.
This PR is part of a series of PRs to add a full implementation of metrics API and SDK support.