pub trait SessionMetrics: Send + Sync {
// Required methods
fn record_session_start(&self);
fn record_session(&self, report: &SessionReport);
fn record_route_decision(&self, rule: &str, action: &str, outcome: &str);
fn record_upstream_open(&self, protocol: &str, outcome: &str);
fn record_upstream_failure(&self, protocol: &str, reason: &str);
fn record_auth_failure(&self);
}Expand description
Trait for recording session metrics. Implemented by external crates.
Narrowed to session, route, upstream, and auth events actually required by
the server data plane. Runtime-only concerns (reload, generation,
platform/transparent/unix events, UDP association lifecycle, exposition)
belong to eggress_metrics::RuntimeMetrics, which the runtime and embed
layers use directly; the server never sees that interface.
Required Methods§
fn record_session_start(&self)
fn record_session(&self, report: &SessionReport)
fn record_route_decision(&self, rule: &str, action: &str, outcome: &str)
fn record_upstream_open(&self, protocol: &str, outcome: &str)
fn record_upstream_failure(&self, protocol: &str, reason: &str)
fn record_auth_failure(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".