Skip to content

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

Merged
lalitb merged 4 commits intoopen-telemetry:mainfrom
lalitb:bucket-boundaries-type
Oct 2, 2022
Merged

[Metrics SDK] Change boundry type to double for Explicit Bucket Histogram Aggregation, and change default bucket range#1626
lalitb merged 4 commits intoopen-telemetry:mainfrom
lalitb:bucket-boundaries-type

Conversation

@lalitb
Copy link
Copy Markdown
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 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
Comment thread sdk/src/metrics/aggregation/histogram_aggregation.cc Outdated
@codecov
Copy link
Copy Markdown

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
Comment thread exporters/ostream/test/ostream_metric_test.cc
Copy link
Copy Markdown
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
Copy Markdown
Member

esigo commented Oct 2, 2022

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

@lalitb
Copy link
Copy Markdown
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