Skip to content

Reduce LongSumAggregator.doRecordLong visibility to protected#8507

Draft
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:refactor/long-sum-aggregator-record-visibility
Draft

Reduce LongSumAggregator.doRecordLong visibility to protected#8507
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:refactor/long-sum-aggregator-record-visibility

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #8506

Description

  • Narrow LongSumAggregator.Handle.doRecordLong(long) from public to protected.
  • The base hook AggregatorHandle.doRecordLong(long) is protected, and all sibling overrides in the internal.aggregator package are protected (DoubleSum, DoubleLastValue, LongLastValue, DoubleExplicitBucketHistogram, DoubleBase2ExponentialHistogram, DropAggregator). LongSumAggregator was the lone public outlier.
  • The single-arg doRecordLong(value) is only called by AggregatorHandle.recordLong in the same class; no external caller relies on public.
  • Completes the visibility cleanup from Reduce public aggregator API to match latest specification. #3557, which missed this method.
  • internal.aggregator is an internal package, so this is not a public API change: no apidiff diff, no CHANGELOG entry.

Testing done

  • Visibility-only, no behavior change, test-exempt; no new test added.
  • ./gradlew :sdk:metrics:check — 694 tests passed (jApiCmp clean, no apidiff change).

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.77%. Comparing base (824334c) to head (a45f51a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8507      +/-   ##
============================================
- Coverage     78.77%   78.77%   -0.01%     
  Complexity     8579     8579              
============================================
  Files          1009     1009              
  Lines         28993    28993              
  Branches       3599     3599              
============================================
- Hits          22839    22838       -1     
- Misses         5311     5312       +1     
  Partials        843      843              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

Reduce LongSumAggregator.doRecordLong visibility to protected

1 participant