-
Notifications
You must be signed in to change notification settings - Fork 966
Add development maxExportBatchSize configuration to Periodic MetricReader #4895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6520ebe
3e479c2
977309e
a0403e9
f09d9a8
382f8e6
97bdf78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
dashpole marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| maximum number of metric data points in a batch that are provided to a single | ||
| export. | ||
|
|
||
| **Status**: [Development](../document-status.md) - When `maxExportBatchSize` is | ||
dashpole marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| configured, the reader MUST ensure no batch provided to `Export` exceeds the | ||
| `maxExportBatchSize` by splitting the batch of metric data points into smaller | ||
cijothomas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this assuming we won't timeout before finishing all metric datapoints from collect1()?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intent is that the timeout is still applied to a single export call, so we would attempt each Export. The problem that could arise is that the SDK generates so many batches that it ends up delaying the next export call. Ideally, language implementations would delay the next Collect, rather than continuously spawning new collections when the previous one hasn't completed. We could alternatively change the timeout to apply to a collect and export(s) cycle, and adopt behavior similar to what you are suggesting (where once we timeout, we discard all unsent batches). |
||
| `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. | ||
|
|
@@ -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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.