Skip to content

[SDK] Fix incorrect delta histogram scale after circular buffer reset - #7749

Merged
martincostello merged 4 commits into
open-telemetry:mainfrom
matt-hensley:fix/circular-buckets-reset-state
Sep 15, 2026
Merged

martincostello merged 4 commits into
open-telemetry:mainfrom
matt-hensley:fix/circular-buckets-reset-state

Conversation

@matt-hensley

@matt-hensley matt-hensley commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Fixed CircularBufferBuckets reset handling so the internal state is cleared correctly.

Previously, stale state could cause an unnecessary scale reduction for the first recording in a new delta histogram.

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 Sep 14, 2026
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-17 06:23 UTC

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

@matt-hensley
matt-hensley marked this pull request as ready for review September 14, 2026 20:05
@matt-hensley
matt-hensley requested a review from a team as a code owner September 14, 2026 20:06
@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.86%. Comparing base (6265592) to head (b538ec9).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7749      +/-   ##
==========================================
- Coverage   91.87%   91.86%   -0.01%     
==========================================
  Files         337      337              
  Lines       18380    18382       +2     
==========================================
  Hits        16887    16887              
- Misses       1493     1495       +2     
Flag Coverage Δ
unittests-Project-Experimental 91.94% <100.00%> (-0.05%) ⬇️
unittests-Project-Stable 91.95% <100.00%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
src/OpenTelemetry/Metrics/CircularBufferBuckets.cs 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

@martincostello
martincostello added this pull request to the merge queue Sep 15, 2026
Merged via the queue into open-telemetry:main with commit c0e029e Sep 15, 2026
80 checks passed
@martincostello martincostello added this to the v1.19.0 milestone Sep 15, 2026
@matt-hensley
matt-hensley deleted the fix/circular-buckets-reset-state branch September 15, 2026 12:54
This was referenced Sep 28, 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.

3 participants