-
Notifications
You must be signed in to change notification settings - Fork 889
[Metrics] Implement cumulative aggregation for async Long and Double counters in MetricPoint #7227
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
Open
nabutabu
wants to merge
22
commits into
open-telemetry:main
Choose a base branch
from
nabutabu:otel-7215-metricpointaggregation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
76d6a88
[Metrics] Implement cumulative aggregation for async Long and Double …
nabutabu 16be094
Revert "[Metrics] Implement cumulative aggregation for async Long and…
nabutabu 0a1526f
[Metrics] Correct asynchronous cumulative metric point handling and u…
nabutabu 6c0d378
[Metrics] Simplify logic and hold metric point instead of indexing twice
nabutabu d48d885
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu b3bc76d
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu a398c3b
[Tests] Add spatial aggregation tests for ObservableCounter and Synch…
nabutabu e68e457
[Tests] Add spatial aggregation tests for ObservableGauge and Exempla…
nabutabu 358c5bb
[Metrics] Enhance UpdateWithExemplar to include exemplar value for lo…
nabutabu 726a498
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 0817a6b
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu a265e27
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 84409b2
[AggregatorStore] Ensure index check for asynchronous aggregation types
nabutabu 4311da4
lint issues fixed
nabutabu 4820002
[MetricApiTests] Skip failing tests related to absent stream handling…
nabutabu 8283f11
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 08d77cf
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu e47bcf5
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu e79bf8d
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 2d8f7c5
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 0dcc90d
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu 371171b
Merge branch 'main' into otel-7215-metricpointaggregation
nabutabu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
|
martincostello marked this conversation as resolved.
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
The idea of modifying the incoming value to achieve "spatial aggregation" is good - but it does create incorrect Exemplar values.
It is not that bad - as Exemplars have limited utility in Observable instruments anyway and Exemplars are disabled also by-default for Observable. We should see if the fix can keep Exemplars correct as well. (Exemplar should get the original unmodified value, but Metricpoint should get the updated one..)
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.
Read more about Exemplars and this does complicate this issue a bit. Blurting out my understanding of what's happening for future me:
Exemplars are defined as: "access to the raw measurement value, time stamp when measurement was made, and trace context", which means each exemplar recording should be the raw reading instead of the cumulative value that the (non-exemplar) async cumulative instrument uses.
This is important because each exemplar metric recording is also associated with a trace. If exemplars stored aggregated values, we'd lose the connection to individual traces for each recording. The exemplar's purpose is to preserve the context of specific measurements that contribute to the aggregate, which this current change loses.
I'll come back when I have more on how we could fix this.
UpdateWithExemplarinMetricPoint-> "number" would be the cumulative value and the new parameter is the measured value.Interlocked.Addis called on the running value. Also would this work for every kind of instrument?