Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ release.

### Metrics

- Add development `maxExportBatchSize` parameter to Periodic exporting MetricReader.
([#4895](https://github.com/open-telemetry/opentelemetry-specification/pull/4895))

### Logs

### Baggage
Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ formats is required. Implementing more than one format is optional.
| Metric SDK supports configuring cardinality limit at MeterReader level | | - | + | + | - | | - | | - | - | - | | - |
| Metric SDK supports configuring cardinality limit per metric (using Views) | | - | + | + | - | | - | | - | - | + | | - |
| Metric SDK supports per-timeseries cumulative start timestamps | | | | | | | | | | | | | - |
| The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter | | - | - | - | - | - | - | - | - | - | - | - | - |

## Logs

Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '+'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/erlang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '+'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '+'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/kotlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '-'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '?'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/ruby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '?'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '-'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ sections:
status: '?'
- name: Metric SDK supports per-timeseries cumulative start timestamps
status: '?'
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
status: '-'
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ sections:
- name: Metric SDK supports configuring cardinality limit at MeterReader level
- name: Metric SDK supports configuring cardinality limit per metric (using Views)
- name: Metric SDK supports per-timeseries cumulative start timestamps
- name: The metric SDK's periodic Reader implementation supports the `maxExportBatchSize` parameter
- name: Logs
features:
- name: LoggerProvider.Get Logger
Expand Down
26 changes: 22 additions & 4 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -1448,9 +1448,23 @@ a user-configurable time interval, and passes the metrics to the configured
Configurable parameters:

* `exportIntervalMillis` - the time interval in milliseconds between two
consecutive exports. The default value is 60000 (milliseconds).
consecutive collections. The default value is 60000 (milliseconds).
* `exportTimeoutMillis` - how long the export can run before it is cancelled.
The default value is 30000 (milliseconds).
* **Status**: [Development](../document-status.md) - `maxExportBatchSize` - the
maximum number of metric data points in a batch that are provided to a single
export.

**Status**: [Development](../document-status.md) - When `maxExportBatchSize` is
configured, the reader MUST ensure no batch provided to `Export` exceeds the
`maxExportBatchSize` by splitting the batch of metric data points into smaller
batches. The initial batch of metric data MUST be split into as many "full"
batches of size `maxExportBatchSize` as possible -- even if this splits up data
points that belong to the same metric into different batches. The reader MUST
ensure all metric data points from a single `Collect()` are provided to
`Export` before metric data points from a subsequent `Collect()` so that metric
points are sent in-order. The reader MUST NOT combine metrics from different
`Collect()` calls into the same batch provided to `Export`.

The reader MUST synchronize calls to `MetricExporter`'s `Export`
to make sure that they are not invoked concurrently.
Expand All @@ -1475,9 +1489,13 @@ from `MetricReader` and start a background task which calls the inherited
This method provides a way for the periodic exporting MetricReader
so it can do as much as it could to collect and send the metrics.

`ForceFlush` SHOULD collect metrics, call [`Export(batch)`](#exportbatch)
and [`ForceFlush()`](#forceflush-2) on the configured
[Push Metric Exporter](#push-metric-exporter).
`ForceFlush` SHOULD collect metrics, split into batches if necessary, call
[`Export(batch)`](#exportbatch) on each batch and
[`ForceFlush()`](#forceflush-2) on the configured
[Push Metric Exporter](#push-metric-exporter). `ForceFlush` MAY skip
[`Export(batch)`](#exportbatch) calls if the timeout is already expired, but
SHOULD still call [`ForceFlush()`](#forceflush-2) on the configured
[Push Metric Exporter](#push-metric-exporter) even if the timeout has passed.

`ForceFlush` SHOULD provide a way to let the caller know whether it succeeded,
failed or timed out. `ForceFlush` SHOULD return some **ERROR** status if there
Expand Down
Loading