pub struct DispatchAuditEvent {
pub rule_id: RuleId,
pub trigger_kind: TriggerKind,
pub outcome: DispatchOutcome,
pub matched_seq: u64,
pub matched_scope: String,
pub context_event_count: usize,
pub peer: Option<String>,
pub ts_ms: u64,
}Expand description
Structured audit record written into scryer’s tower.dispatch scope.
One Dispatched record is written before the trigger fires (idempotency
marker). One Failed record is written if the trigger handler errors; the
presence of Dispatched without a following Failed indicates successful
invocation.
Queryable from scryer via
scryer.events(Service(MeshIdent("tower.local"))).
Fields§
§rule_id: RuleId§trigger_kind: TriggerKind§outcome: DispatchOutcome§matched_seq: u64Sequence number of the matched event (for cross-referencing).
matched_scope: StringScope identifier of the matched event, e.g. "service:yubaba.local".
context_event_count: usizeNumber of context events included in the dispatch payload.
peer: Option<String>Peer the event was federated from, if any.
ts_ms: u64Unix milliseconds at dispatch time.
Implementations§
Source§impl DispatchAuditEvent
impl DispatchAuditEvent
Sourcepub fn to_scryer_event(&self, seq: u64) -> Event
pub fn to_scryer_event(&self, seq: u64) -> Event
Convert to a scryer event for writing into the tower.dispatch scope.
Scope is Service(MeshIdent("tower.local")) per arch doc §Dispatch step 3.
target is "tower.dispatch" on success or "tower.dispatch.failed" on error.
seq is supplied by the caller (scryer assigns per-scope sequence numbers).
Trait Implementations§
Source§impl Clone for DispatchAuditEvent
impl Clone for DispatchAuditEvent
Source§fn clone(&self) -> DispatchAuditEvent
fn clone(&self) -> DispatchAuditEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more