Skip to main content

publish_telemetry

Function publish_telemetry 

Source
fn publish_telemetry(
    supervisor: &mut SessionPixSupervisor,
    gate: &Arc<ServiceGate>,
    telemetry: &Arc<PixSessionTelemetry>,
)
Expand description

Publishes this Session’s share of the node-level PIX aggregates.

Called once per turn, after dispatch rather than before it, and on the terminal path as well as the ordinary one. Both halves of that matter:

  • after, because dispatch applies the gate transitions locally before sending anything, and the gate is where the predeposit exposure is read from. Publishing first would report a rotating Session’s exhausted predecessor allowance for one more turn.
  • on the terminal path too, because that turn is the one that carries the last failed/recovered counts, and the worker is about to stop. Returning the gauges to zero is not this function’s job — PixSessionTelemetry::release does that from close_session, which knows the Session is gone rather than merely that this worker has stopped.

Kept out of dispatch for the reason report_fill_stall is: this produces no work for the action driver, only numbers for the operator, and dispatch’s callers hold the supervisor by different borrows.