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

Console exporter: Display exponential histogram boundaries #4507

Merged

Conversation

alanwest
Copy link
Member

Reopening #4344

The LowerBoundary implementation used in this PR was separately implemented in #4465.LowerBoundary just as with the inverse MapToIndex can result in some precision loss at positive scales, so recorded values very close to a bucket boundary may not be accurately mapped.

Example Code

var histogram = meter.CreateHistogram<double>("histogram");
histogram.Record(0);
histogram.Record(1000);
histogram.Record(1000.01);

Output from console exporter

Export histogram, Meter: TestMeter
(2023-05-18T19:08:04.9403420Z, 2023-05-18T19:08:04.9464400Z] ExponentialHistogram
Value: Sum: 2000.01 Count: 3 Min: 0 Max: 1000.01 
Zero Bucket:1
(999.9998532010651, 1000.0005142378502]:1
(1000.0005142378502, 1000.0011752750722]:0
(1000.0011752750722, 1000.0018363127313]:0
(1000.0018363127313, 1000.0024973508272]:0
(1000.0024973508272, 1000.0031583893601]:0
(1000.0031583893601, 1000.0038194283301]:0
(1000.0038194283301, 1000.004480467737]:0
(1000.004480467737, 1000.0051415075809]:0
(1000.0051415075809, 1000.0058025478617]:0
(1000.0058025478617, 1000.0064635885795]:0
(1000.0064635885795, 1000.0071246297343]:0
(1000.0071246297343, 1000.007785671326]:0
(1000.007785671326, 1000.0084467133548]:0
(1000.0084467133548, 1000.0091077558196]:0
(1000.0091077558196, 1000.0097687987222]:0
(1000.0097687987222, 1000.010429842062]:1

alanwest added 2 commits May 18, 2023 11:55

Verified

This commit was signed with the committer’s verified signature.
alanwest Alan West

Verified

This commit was signed with the committer’s verified signature.
alanwest Alan West
@alanwest alanwest requested a review from a team May 18, 2023 19:21
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #4507 (98f736b) into main (47d88e1) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head 98f736b differs from pull request most recent head 582d6f0. Consider uploading reports for the commit 582d6f0 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4507      +/-   ##
==========================================
- Coverage   85.15%   85.13%   -0.02%     
==========================================
  Files         317      316       -1     
  Lines       12594    12589       -5     
==========================================
- Hits        10724    10718       -6     
- Misses       1870     1871       +1     
Impacted Files Coverage Δ
...elemetry.Exporter.Console/ConsoleMetricExporter.cs 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

@utpilla
Copy link
Contributor

utpilla commented May 23, 2023

Approving to unblock progress.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@alanwest alanwest merged commit eb12f9b into open-telemetry:main May 24, 2023
@alanwest alanwest deleted the alanwest/console-exporter-buckets branch May 24, 2023 22:27
vitek-karas pushed a commit to vitek-karas/opentelemetry-dotnet that referenced this pull request May 29, 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

2 participants