Skip to content

Add a non-blocking snapshot API for available distributed task metrics #685

Description

@sesteves

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions