Skip to content

Reduce LongSumAggregator.doRecordLong visibility to protected #8506

Description

@thswlsqls

Is your feature request related to a problem? Please describe.
In the io.opentelemetry.sdk.metrics.internal.aggregator package, AggregatorHandle.doRecordLong(long) is a protected hook. Every aggregator overrides it as protected (DoubleSumAggregator, DoubleLastValueAggregator, LongLastValueAggregator, DoubleExplicitBucketHistogramAggregator, DoubleBase2ExponentialHistogramAggregator, DropAggregator), except LongSumAggregator.Handle.doRecordLong(long) (LongSumAggregator.java line 133), which widens it to public — the lone outlier.

Describe the solution you'd like
Narrow LongSumAggregator.Handle.doRecordLong(long) from public to protected to match the base hook and all sibling overrides. The single-arg doRecordLong(value) is only called by AggregatorHandle.recordLong, so no caller relies on the wider visibility. This completes the cleanup started in #3557, which narrowed aggregator visibility but missed this method.

Describe alternatives you've considered
N/A.

Spec alignment
Not spec-related; this is an internal-package consistency cleanup with no observable behavior change.

Additional context

  • Affected module: :sdk:metrics
  • Artifact stability: stable (internal package, exempt from semver/japicmp)
  • Backward compatible: yes (narrowing override of a protected base method; no external caller)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions