pub struct DriverObservability {
pub substrate_calls: Vec<(&'static str, u64)>,
pub substrate_total_calls: u64,
pub decision_buckets: Vec<(&'static str, u64)>,
pub audit_events: Vec<SubstrateAuditEvent>,
pub dispatch: DispatchTelemetry,
}Expand description
Snapshot of every driver-tier metric at a single instant.
Cheap to construct (atomic loads + flat Vec allocations).
Callers serialize via serde or convert to their dashboard’s
metric format.
Fields§
§substrate_calls: Vec<(&'static str, u64)>Per-substrate-module call counts.
substrate_total_calls: u64Sum across all substrate counters - single-number health signal.
decision_buckets: Vec<(&'static str, u64)>Substrate-decision histogram buckets (fusion / eviction /
provenance) from
vyre_self_substrate::decision_telemetry.
audit_events: Vec<SubstrateAuditEvent>Bounded recent audit events emitted by substrate decisions
while VYRE_TRACE=1 is active.
dispatch: DispatchTelemetryBackend-neutral dispatch counters captured at the shared runtime boundary.
Implementations§
Source§impl DriverObservability
impl DriverObservability
Sourcepub fn try_snapshot() -> Result<Self, BackendError>
pub fn try_snapshot() -> Result<Self, BackendError>
Fallibly take a snapshot of all driver-tier metrics.
§Errors
Returns crate::backend::BackendError when substrate telemetry is not
compiled in. Callers that require substrate counters should use this
method instead of treating the compatibility Self::snapshot fallback
as a full observability view.
Sourcepub fn to_prometheus(&self) -> String
pub fn to_prometheus(&self) -> String
Format the snapshot as Prometheus text-exposition format.
Counter metrics use vyre_driver_substrate_calls_total{module="<name>"}.
Sourcepub fn to_audit_log(&self) -> String
pub fn to_audit_log(&self) -> String
Format recent substrate audit events as line-oriented text.
Trait Implementations§
Source§impl Clone for DriverObservability
impl Clone for DriverObservability
Source§fn clone(&self) -> DriverObservability
fn clone(&self) -> DriverObservability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more