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

[Metrics SDK] Change boundry type to double for Explicit Bucket Histogram Aggregation, and change default bucket range #1626

Merged
merged 4 commits into from
Oct 2, 2022

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Sep 21, 2022

Fixes: #1628, #1629
Irrespective of the aggregation data type (long or double) for values stored in buckets, the boundaries range should be always of type double.

As mentioned in the specs - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation

This PR fixes it.

Also, change the default buckets as per specs changes - open-telemetry/opentelemetry-specification#2770 from
0, 5, 10, 25, 50, 75, 100, 250, 500, 1000 to 0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000

@lalitb lalitb requested a review from a team as a code owner September 21, 2022 23:08
@lalitb lalitb changed the title Change boundaries value to double in Explicit Bucket Histogram Aggregation Change boundaries value to double for Explicit Bucket Histogram Aggregation Sep 21, 2022
@lalitb lalitb changed the title Change boundaries value to double for Explicit Bucket Histogram Aggregation Change boundaries type to double for Explicit Bucket Histogram Aggregation Sep 21, 2022
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #1626 (e3da361) into main (9e87a6e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1626      +/-   ##
==========================================
- Coverage   85.09%   85.08%   -0.00%     
==========================================
  Files         159      159              
  Lines        5001     4991      -10     
==========================================
- Hits         4255     4246       -9     
+ Misses        746      745       -1     
Impacted Files Coverage Δ
...metry/sdk/metrics/aggregation/aggregation_config.h 100.00% <ø> (ø)
...nclude/opentelemetry/sdk/metrics/data/point_data.h 100.00% <ø> (ø)
exporters/ostream/src/metric_exporter.cc 91.81% <100.00%> (-0.32%) ⬇️
exporters/ostream/test/ostream_metric_test.cc 100.00% <100.00%> (ø)
...k/src/metrics/aggregation/histogram_aggregation.cc 87.63% <100.00%> (-0.12%) ⬇️
sdk/src/trace/batch_span_processor.cc 90.63% <0.00%> (-0.78%) ⬇️
...metry/nostd/internal/absl/types/internal/variant.h 71.56% <0.00%> (+0.39%) ⬆️

@lalitb lalitb changed the title Change boundaries type to double for Explicit Bucket Histogram Aggregation [Metrics SDK] Change boundaries type to double for Explicit Bucket Histogram Aggregation Sep 22, 2022
@lalitb lalitb changed the title [Metrics SDK] Change boundaries type to double for Explicit Bucket Histogram Aggregation [Metrics SDK] Change boundry type to double for Explicit Bucket Histogram Aggregation, and change default bucket range Sep 22, 2022
Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the PR :)

@esigo
Copy link
Member

esigo commented Oct 2, 2022

could you please add #1629 and #1628 to the PR description.

@lalitb
Copy link
Member Author

lalitb commented Oct 2, 2022

could you please add #1629 and #1628 to the PR description.

Thanks added.

@lalitb lalitb merged commit d127140 into open-telemetry:main Oct 2, 2022
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
…togram Aggregation, and change default bucket range (open-telemetry#1626)

* fix bucket boundaries type for histogram aggregation

* update bucket range, and fix build
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.

[Metrics SDK] Boundaries type for Explicit Bucket Histogram Aggregation should be double
4 participants