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 snapshot() -> DriverObservability
pub fn snapshot() -> DriverObservability
Take a snapshot of all driver-tier metrics now.
Sourcepub fn try_snapshot() -> Result<DriverObservability, BackendError>
pub fn try_snapshot() -> Result<DriverObservability, 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 moreAuto Trait Implementations§
impl Freeze for DriverObservability
impl RefUnwindSafe for DriverObservability
impl Send for DriverObservability
impl Sync for DriverObservability
impl Unpin for DriverObservability
impl UnsafeUnpin for DriverObservability
impl UnwindSafe for DriverObservability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more