pub struct ProtectedRelayStats { /* private fields */ }Expand description
Typed telemetry for the protected route-hop relay.
One instance per node, incremented from the relay’s dispatch path
— atomic adds only, because that path carries an
allocation-freedom witness. forwarded counts envelopes actually
emitted toward the egress peer (authorized AND sent); the denial
counters split the authority verdict by exact
ForwardDenial reason, so an
operator — or a witness — can distinguish “this gateway refused
for lack of ROUTE” from “nothing ever reached its authority
decision”. Drops earlier on the relay path (unparseable envelope,
unknown session, bad tag, expired TTL, no route) are deliberately
not counted here: they precede the authority decision this
telemetry exists to attribute.
Implementations§
Source§impl ProtectedRelayStats
impl ProtectedRelayStats
Sourcepub fn record_forwarded(&self)
pub fn record_forwarded(&self)
An authorized envelope left this node toward the egress peer.
Sourcepub fn record_denied(&self, denial: ForwardDenial)
pub fn record_denied(&self, denial: ForwardDenial)
The authority decision refused the transition.
Sourcepub fn denied(&self, denial: ForwardDenial) -> u64
pub fn denied(&self, denial: ForwardDenial) -> u64
Denials recorded for exactly denial.