Skip to content

Add OTEL_METRIC_EXPORT_MAX_BATCH_SIZE env var for Periodic exporting MetricReader - #5359

Merged
dashpole merged 2 commits into
open-telemetry:mainfrom
psx95:max-export-batch-size-env
Oct 27, 2026
Merged

dashpole merged 2 commits into
open-telemetry:mainfrom
psx95:max-export-batch-size-env

Conversation

@psx95

@psx95 psx95 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #5358

Changes

Adds the OTEL_METRIC_EXPORT_MAX_BATCH_SIZE environment variable to the Periodic exporting MetricReader section of the Environment Variable Specification to configure the maxExportBatchSize option (stabilized in #5291).

For non-trivial changes, follow the change proposal process.

@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-27 19:05 UTC

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

@psx95
psx95 force-pushed the max-export-batch-size-env branch from 451370c to 9b947ac Compare October 14, 2026 19:02
@psx95
psx95 marked this pull request as ready for review October 14, 2026 19:35
@psx95
psx95 requested a review from a team as a code owner October 14, 2026 19:35

@dashpole dashpole left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm generally against adding new environment variables now that declarative configuration is stable, but I am supportive of adding this one:

  • It satisfies the requirements of the (now ancient) environment variable moratorium (statically typed, primitive integer).
  • It is nice for consistency, since all the other Periodic exporting MetricReader options (OTEL_METRIC_EXPORT_INTERVAL, OTEL_METRIC_EXPORT_TIMEOUT) and the equivalent batch size knobs in Traces (OTEL_BSP_MAX_EXPORT_BATCH_SIZE) and Logs (OTEL_BLRP_MAX_EXPORT_BATCH_SIZE) are available as environment variables.
  • Both @cijothomas and @jack-berg have previously expressed some openness to having a spec-level environment variable for this.

@braydonk braydonk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weighing in since it might be tangentially related to the Batching Configuration Standardization project.

Environment variables aren't really on our radar as far as I know. I don't think this will conflict/impact anything we're working on as part of that project. Thanks!

@jack-berg

Copy link
Copy Markdown
Member

I'm neutral.

@carlosalberto

Copy link
Copy Markdown
Contributor

@dashpole We assigned this to you ;)

@dashpole
dashpole added this pull request to the merge queue Oct 27, 2026
Merged via the queue into open-telemetry:main with commit 80ebdc2 Oct 27, 2026
11 checks passed
@psx95
psx95 deleted the max-export-batch-size-env branch October 27, 2026 19:04
pellared pushed a commit to pellared/opentelemetry-specification that referenced this pull request Nov 3, 2026
…etry#5406)

## Changes

Four changes merged after the `v1.62.0` tag were recorded under that
release. Move them to the corresponding `Unreleased` subsections:

- open-telemetry#5359: `OTEL_METRIC_EXPORT_MAX_BATCH_SIZE` environment variable.
- open-telemetry#5363: optional ETW `etw.provider.name` mapping; also add its missing
PR link.
- open-telemetry#5368: identifying resource attributes in the Prometheus target info
metric.
- open-telemetry#5271: optional Sum handling in histogram conversion.

Verified all 20 distinct PR references in `Unreleased` and `v1.62.0`
against the `v1.61.0` and `v1.62.0` Git tags. The remaining `v1.62.0`
entry text matches the release tag, and older release sections are
unchanged. `git diff --check` passes.

For non-trivial changes, follow the [change proposal
process](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change).

* [ ] Related issues: N/A; changelog correction only.
* [ ] Related [OTEP(s)](https://github.com/open-telemetry/oteps): N/A.
* [ ] Links to the prototypes: N/A; no features or behavior changes.
* [x]
[`CHANGELOG.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md)
updated.
* For trivial changes, include `[chore]` in the PR title to skip the
changelog check.
* [ ] [Spec compliance
matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix/template.yaml):
N/A.
* [ ] [Declarative config data
model](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/data-model.md#overview):
N/A.

> [!NOTE]
> This PR and its description were prepared with OpenAI Codex.

Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
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.

Add OTEL_METRIC_EXPORT_MAX_BATCH_SIZE environment variable for Periodic exporting MetricReader

8 participants