open-telemetry / open-telemetry/opentelemetry-ruby
Implement `maxExportBatchSize` on the periodic reader
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Spec requirement
[Development] The periodic exporting MetricReader SHOULD support a maxExportBatchSize parameter with in-order, non-combined batch splitting (sdk.md:1540-1584, Periodic exporting MetricReader).
Current behavior
export/periodic_metric_reader.rb:25-26 (permalink) correctly reads OTEL_METRIC_EXPORT_INTERVAL/OTEL_METRIC_EXPORT_TIMEOUT with the right 60000/30000 defaults, and :125 (permalink) synchronizes Export calls correctly, but maxExportBatchSize doesn't exist. Every collected batch is sent as one Export call (:126-127 (permalink)), so batch splitting isn't possible.
Suggested fix
Add a max_export_batch_size: option and split each collected batch into ordered, non-combined chunks of at most that size before calling Export once per chunk.
Related rows in SPEC_COMPLIANCE_METRICS.md
SDK-57
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in metrics_sdk/lib/opentelemetry/sdk/metrics/export/periodic_metric_reader.rb, especially the Export call around lines 125-127, and compare its behavior with the linked metrics SDK specification. Done means the reader accepts max_export_batch_size and sends collected data in ordered, non-combined chunks no larger than that size; verify the periodic reader's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100