Problem
The public metrics-rewriting API waits for all worker tasks to report metrics. Complete metrics may be unavailable after cancellation, task failure, timeout, or shutdown, even though some reports have already arrived.
There is currently no public way to consume those available metrics. The internal rewriter also assumes every expected task is present.
Requested API
Expose a non-blocking, point-in-time API for available task metrics.
The API should:
- Include every available report.
- Tolerate missing reports and gaps in task numbers.
- Preserve existing metrics formats.
- Indicate whether the snapshot is complete.
- Leave the existing complete-metrics API unchanged.
No protocol or worker-reporting changes should be required.
Context
Partial metrics are useful for diagnostics, monitoring, accounting, and resource management. Consumers should be able to use available information without waiting indefinitely or depending on internal implementation details.
Problem
The public metrics-rewriting API waits for all worker tasks to report metrics. Complete metrics may be unavailable after cancellation, task failure, timeout, or shutdown, even though some reports have already arrived.
There is currently no public way to consume those available metrics. The internal rewriter also assumes every expected task is present.
Requested API
Expose a non-blocking, point-in-time API for available task metrics.
The API should:
No protocol or worker-reporting changes should be required.
Context
Partial metrics are useful for diagnostics, monitoring, accounting, and resource management. Consumers should be able to use available information without waiting indefinitely or depending on internal implementation details.