Skip to content

[SDK] Restore configured MaxScale after delta histogram collection - #7671

Merged
martincostello merged 5 commits into
open-telemetry:mainfrom
matt-hensley:matt-hensley/histogram-scale-overwrite
Aug 21, 2026
Merged

martincostello merged 5 commits into
open-telemetry:mainfrom
matt-hensley:matt-hensley/histogram-scale-overwrite

Conversation

@matt-hensley

@matt-hensley matt-hensley commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Changes

Restores configured MaxScale after a delta exponential-histogram is collected.

MaxScale is the maximum scale available to an exponential histogram stream, so resetting or copying the histogram should not discard that configuration, per the metrics SDK spec.

This restores the config after collection and when copying a histogram, while preserving the reset behavior introduced in #6557.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@github-actions github-actions Bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Aug 21, 2026
@matt-hensley
matt-hensley marked this pull request as ready for review August 21, 2026 01:26
@matt-hensley
matt-hensley requested a review from a team as a code owner August 21, 2026 01:26
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 21, 2026

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-08-21 08:47 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.38%. Comparing base (f6f6022) to head (7d5d9b3).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7671      +/-   ##
==========================================
- Coverage   91.39%   91.38%   -0.02%     
==========================================
  Files         318      318              
  Lines       17810    17812       +2     
==========================================
  Hits        16278    16278              
- Misses       1532     1534       +2     
Flag Coverage Δ
unittests-Project-Experimental 91.45% <100.00%> (-0.03%) ⬇️
unittests-Project-Stable 91.47% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ics/MetricPoint/Base2ExponentialBucketHistogram.cs 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@martincostello martincostello added this to the v1.18.0 milestone Aug 21, 2026
Comment thread test/OpenTelemetry.Tests/Metrics/AggregatorTests.cs Outdated
@martincostello
martincostello added this pull request to the merge queue Aug 21, 2026
Merged via the queue into open-telemetry:main with commit c53a73a Aug 21, 2026
80 checks passed
This was referenced Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants