-
Notifications
You must be signed in to change notification settings - Fork 813
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
fix(sdk-metrics): preserve startTime for cumulative ExponentialHistograms #3934
Conversation
246c4ba
to
2852cbf
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3934 +/- ##
==========================================
+ Coverage 92.90% 92.97% +0.06%
==========================================
Files 297 297
Lines 8838 8839 +1
Branches 1815 1815
==========================================
+ Hits 8211 8218 +7
+ Misses 627 621 -6
|
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.
Looks good, thanks for fixing this 🙂
cc @mwear would you mind taking a look? 🙂
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, this was definitely an oversight. Thanks for finding and fixing @aabmass!
Which problem is this PR solving?
Fixes #3931
Short description of the changes
We were throwing away previous value's
startTime
. This updates to keep the older (previous)startTime
when merging. See similar logic for Histograms: https://github.com/aabmass/opentelemetry-js/blob/b4fde50bb8e9848e70b1c9c2db5d6909741b422c/packages/sdk-metrics/src/aggregator/Histogram.ts#L154Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added a new integration/regression test. Updated the unit tests.
Checklist: