Skip to content
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

Stop ignoring long measurements in HistogramExemplarReservoir #5216

Merged

Conversation

jack-berg
Copy link
Member

As noted by @dashpole here there's a bug in the HistogramExemplarReservoir implementation.

HistogramPointData only supports double exemplars. Despite our API supporting both LongHistogram and DoubleHistogram, long values are simply converted to doubles in the aggregator. However, the HistogramExemplarReservoir didn't get the memo and reports a value of 0.0 when any long measurement is recorded as an exemplar.

This fixes the issue by casting long measurements to double before storing in the reservoir.

@jack-berg jack-berg requested a review from a team as a code owner February 14, 2023 21:58
@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Base: 91.08% // Head: 91.09% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (d0d9abb) compared to base (f183114).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5216   +/-   ##
=========================================
  Coverage     91.08%   91.09%           
  Complexity     4875     4875           
=========================================
  Files           549      549           
  Lines         14418    14420    +2     
  Branches       1372     1372           
=========================================
+ Hits          13133    13136    +3     
  Misses          891      891           
+ Partials        394      393    -1     
Impacted Files Coverage Δ
.../internal/exemplar/HistogramExemplarReservoir.java 90.90% <100.00%> (+2.02%) ⬆️
...ava/io/opentelemetry/sdk/internal/RateLimiter.java 94.11% <0.00%> (-5.89%) ⬇️
...telemetry/sdk/trace/export/BatchSpanProcessor.java 94.48% <0.00%> (+0.68%) ⬆️
...metry/sdk/logs/export/BatchLogRecordProcessor.java 91.48% <0.00%> (+0.70%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jack-berg jack-berg merged commit 5d2855b into open-telemetry:main Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants