Skip to content

Stabilize PeriodicMetricReaderBuilder#setMaxExportBatchSize - #8829

Merged
jack-berg merged 1 commit into
open-telemetry:mainfrom
dashpole:stabilize-metric-batching
Sep 25, 2026
Merged

jack-berg merged 1 commit into
open-telemetry:mainfrom
dashpole:stabilize-metric-batching

Conversation

@dashpole

Copy link
Copy Markdown
Contributor

Stabilizes PeriodicMetricReaderBuilder#setMaxExportBatchSize(int) following its stabilization in the OpenTelemetry Specification (open-telemetry/opentelemetry-specification#5291).

Changes

  • Make PeriodicMetricReaderBuilder#setMaxExportBatchSize(int) public (@since 1.67.0).
  • Remove the internal reflective helper SdkMeterProviderUtil#setMaxExportBatchSize.
  • Update declarative configuration's MetricReaderFactory to call builder.setMaxExportBatchSize(...) directly.

@dashpole
dashpole requested a review from psx95 September 16, 2026 16:37
@otelbot otelbot Bot added the api-change Changes to public API surface area label Sep 16, 2026
@otelbot

otelbot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

⚠️ API changes detected — additional maintainer review required

@jack-berg @jkwatson

This PR modifies the public API surface area of the following module(s):

  • opentelemetry-sdk-metrics

Please review the changes in docs/apidiffs/current_vs_latest/ carefully before approving.

@dashpole
dashpole force-pushed the stabilize-metric-batching branch from 68f3b72 to fd74395 Compare September 16, 2026 16:39
@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.43%. Comparing base (26287d4) to head (246bd89).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8829      +/-   ##
============================================
- Coverage     91.44%   91.43%   -0.01%     
+ Complexity    10667    10666       -1     
============================================
  Files          1007     1007              
  Lines         28686    28678       -8     
  Branches       3676     3676              
============================================
- Hits          26232    26223       -9     
+ Misses         1657     1656       -1     
- Partials        797      799       +2     

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Stabilizes PeriodicMetricReaderBuilder#setMaxExportBatchSize(int) as public API and removes the reflective workaround.

Changes:

  • Exposes the batch-size setter publicly.
  • Updates declarative configuration and tests.
  • Removes the obsolete helper and records the API diff.
File summaries
File Description
sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/SdkMeterProviderUtil.java Removes the reflective helper.
sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/PeriodicMetricReaderBuilder.java Exposes the batch-size setter publicly.
sdk-extensions/declarative-config/src/test/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/MetricReaderFactoryTest.java Updates expected builder usage.
sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/MetricReaderFactory.java Calls the public setter directly.
docs/apidiffs/current_vs_latest/opentelemetry-sdk-metrics.txt Records the API visibility change.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Lite (auto)

Note

Copilot is running an experiment and ran this review at Lite.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dashpole
dashpole force-pushed the stabilize-metric-batching branch from 192197d to 9f4d6ad Compare September 16, 2026 20:11
@dashpole
dashpole marked this pull request as ready for review September 16, 2026 20:35
@dashpole
dashpole requested a review from a team as a code owner September 16, 2026 20:35
@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-25 18:42 UTC

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

@dashpole
dashpole force-pushed the stabilize-metric-batching branch from 9f4d6ad to 246bd89 Compare September 23, 2026 19:47
@jack-berg
jack-berg merged commit 03ea539 into open-telemetry:main Sep 25, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to public API surface area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants