Skip to content

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

Open
ThomsonTan wants to merge 4 commits into
open-telemetry:mainfrom
ThomsonTan:runtime_scale
Open

[METRICS SDK] Enforce a runtime minimum scale for Base2ExponentialHistogramAggregation#4353
ThomsonTan wants to merge 4 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 93.02326% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.88%. Comparing base (bbf970a) to head (cf355bd).
⚠️ Report is 1 commits behind head on main.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4353      +/-   ##
==========================================
+ Coverage   80.86%   80.88%   +0.02%     
==========================================
  Files         450      450              
  Lines       19215    19247      +32     
==========================================
+ Hits        15537    15566      +29     
- Misses       3678     3681       +3     
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.90% <92.86%> (-0.72%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Define and enforce a runtime minimum scale for Base2ExponentialHistogramAggregation

1 participant