feat(sdk-metrics-base): detect resets on async metrics - #2990
Merged
legendecas merged 3 commits intoJun 28, 2022
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2990 +/- ##
==========================================
- Coverage 93.10% 93.08% -0.03%
==========================================
Files 188 188
Lines 6224 6261 +37
Branches 1316 1323 +7
==========================================
+ Hits 5795 5828 +33
- Misses 429 433 +4
|
legendecas
force-pushed
the
metrics-ff/monotonicity
branch
3 times, most recently
from
May 25, 2022 08:11
5769113 to
4b8448d
Compare
legendecas
force-pushed
the
metrics-ff/monotonicity
branch
11 times, most recently
from
May 31, 2022 03:04
45c7acc to
672368f
Compare
legendecas
force-pushed
the
metrics-ff/monotonicity
branch
from
May 31, 2022 06:53
672368f to
ec2a9da
Compare
legendecas
marked this pull request as ready for review
May 31, 2022 07:32
dyladan
approved these changes
Jun 17, 2022
dyladan
left a comment
Member
There was a problem hiding this comment.
Sorry for late review. Large PR is hard to get time to really go through. Most changes are just passing the hrtime though. I added some comments but none of them are blocking.
pichlermarc
approved these changes
Jun 27, 2022
pichlermarc
left a comment
Member
There was a problem hiding this comment.
Finally had the time to look through this. 🙂
Just a few non-blocking (mostly docs related) comments. Thanks for taking the time to work on this! 🙂
…city # Conflicts: # experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/Histogram.ts # experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Histogram.test.ts
Member
Author
|
Thank you for taking a look at this! |
This was referenced Jun 29, 2022
pichlermarc
pushed a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this pull request
Jul 4, 2022
1 task
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.
Which problem is this PR solving?
Detect resets on async metrics.
Fixes #2987
Short description of the changes
SumAggregator.diffand returns the current value if the previous value is greater than the current one.SumAggregator.mergedistinguishes a reset delta, and does not merge it with previous accumulation.startTimeandendTimenow follow the spec definitions (reset & gaps):startTimeof each point matches theendTimeof the preceding point (for that particular reader).startTimeof each point matches thestartTimeof the initial observation.For an event stream, we should provide the following metric exports:
For a sync event stream, the exported times are:
Type of change
How Has This Been Tested?
Checklist: