Skip to content

[METRICS SDK] Enforce a runtime minimum scale for Base2ExponentialHistogramAggregation - #4353

Merged
marcalff merged 39 commits into
open-telemetry:mainfrom
ThomsonTan:runtime_scale
Sep 30, 2026
Merged

marcalff merged 39 commits into
open-telemetry:mainfrom
ThomsonTan:runtime_scale

Conversation

@ThomsonTan

Copy link
Copy Markdown
Contributor

Fixes #4325

Changes

This change enforces a runtime minimum scale of -10 for base2 exponential histograms, guarantees sufficient bucket capacity at that floor to preserve recorded counts, centralizes scale reduction across record, merge, and diff paths, guards the indexer against oversized shifts, and adds regression tests plus changelog documentation for the new behavior.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@ThomsonTan
ThomsonTan requested a review from a team as a code owner August 4, 2026 02:12
@codecov

codecov Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.37288% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.67%. Comparing base (754928d) to head (e51410f).

Files with missing lines Patch % Lines
...egation/base2_exponential_histogram_aggregation.cc 92.04% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4353      +/-   ##
==========================================
+ Coverage   86.66%   86.67%   +0.02%     
==========================================
  Files         525      525              
  Lines       20481    20543      +62     
==========================================
+ Hits        17748    17804      +56     
- Misses       2733     2739       +6     
Files with missing lines Coverage Δ
...metry/sdk/metrics/aggregation/aggregation_config.h 100.00% <ø> (ø)
...aggregation/base2_exponential_histogram_indexer.cc 100.00% <100.00%> (ø)
...egation/base2_exponential_histogram_aggregation.cc 95.26% <92.04%> (-1.37%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc Outdated
Comment thread sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc Outdated
Comment thread sdk/test/metrics/aggregation_test.cc
Comment thread CHANGELOG.md Outdated
@dbarker dbarker added the pr:please-review This PR is ready for review label Aug 25, 2026
Comment thread sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc Outdated
Comment thread sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc Outdated

@lalitb lalitb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks.

@marcalff
marcalff merged commit 107a1b5 into open-telemetry:main Sep 30, 2026
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:please-review This PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define and enforce a runtime minimum scale for Base2ExponentialHistogramAggregation

4 participants