progress_events
Telemetry about the delivery of progress events.
Progress events are sent fire and forget, so the run that reports one never
learns whether it arrived. These helpers report what the senders did with them
instead: a ProgressEventDeliveryEvent with counts, and a
ProgressReportingDisabledEvent when a process stops reporting altogether.
Neither carries an exception message: failures are named by their gRPC status or a short label, because a message can quote a file path.
Module
Functions
report_progress_event_delivery
def report_progress_event_delivery( *, destination: str, reporting: str, event_kinds: Iterable[str], submitted: int, sent: int, failed: int, dropped: int, discarded: int, failures_by_reason: Mapping[str, int],) ‑> None:Emit a ProgressEventDeliveryEvent, never raising.
Sent at WARNING when any event was lost, so a lossy interval stands out from a healthy one.
Arguments
destination: Where the sender delivers.reporting: The sender's state.event_kinds: The kinds of event submitted in the interval.submitted: Events handed to the sender.sent: Events the destination accepted.failed: Events whose send failed.dropped: Events dropped because the queue was full.discarded: Events thrown away unsent.failures_by_reason:failed, split by status name or failure label.
report_progress_reporting_disabled
def report_progress_reporting_disabled( *, destination: str, reason: str, last_failure: str | None = None, consecutive_failures: int = 0, discarded: int = 0,) ‑> None:Emit a ProgressReportingDisabledEvent, never raising.
Sent at ERROR, except for "no_grant", which is a WARNING.
Arguments
destination: Where the sender delivered.reason: Why reporting stopped; seeProgressReportingDisabledEvent.last_failure: The status name or label of the send that disabled the sender, when one did.consecutive_failures: Failed sends in a row when the sender stopped.discarded: Queued events thrown away when the sender stopped.