FabricMetrics

Struct FabricMetrics 

Source
pub struct FabricMetrics {
Show 32 fields pub leases_active: MetricGauge, pub leases_total: MetricCounter, pub leases_expired: MetricCounter, pub leases_fenced: MetricCounter, pub ops_total: MetricCounter, pub ops_errors: MetricCounter, pub bytes_read: MetricCounter, pub bytes_written: MetricCounter, pub rewrites_total: MetricCounter, pub op_latency: MetricHistogram, pub leases_revoked: MetricCounter, pub bind_latency: MetricHistogram, pub renew_latency: MetricHistogram, pub revoke_latency: MetricHistogram, pub teardown_latency: MetricHistogram, pub auth_failures: MetricCounter, pub replay_rejections: MetricCounter, pub token_validations: MetricCounter, pub token_failures: MetricCounter, pub stale_access_rejections: MetricCounter, pub control_latency: MetricHistogram, pub dataplane_latency: MetricHistogram, pub tasklet_submit_latency: MetricHistogram, pub tasklet_exec_latency: MetricHistogram, pub tasklet_submits: MetricCounter, pub tasklet_completions: MetricCounter, pub tasklet_failures: MetricCounter, pub tasklet_duration: MetricHistogram, pub module_cache_hits: MetricCounter, pub module_cache_misses: MetricCounter, pub module_cache_stores: MetricCounter, pub module_cache_hash_mismatches: MetricCounter,
}
Expand description

Global fabric metrics registry.

Tracks system-wide counters and gauges for lease lifecycles, data-plane operations, and graph rewrites. Access the process-wide singleton via FabricMetrics::global().

§Examples

use grafos_observe::FabricMetrics;

let m = FabricMetrics::global();
m.leases_total.inc();
m.leases_active.inc();
m.ops_total.add(5);
m.bytes_read.add(1024);
m.op_latency.observe(300);

Fields§

§leases_active: MetricGauge

Currently active leases (gauge — goes up on acquire, down on drop/expire).

§leases_total: MetricCounter

Total leases ever created (counter).

§leases_expired: MetricCounter

Total leases that expired (counter).

§leases_fenced: MetricCounter

Total leases that entered fenced state (counter).

§ops_total: MetricCounter

Total data-plane operations completed (counter).

§ops_errors: MetricCounter

Total data-plane operations that failed (counter).

§bytes_read: MetricCounter

Total bytes read across all data-plane operations (counter).

§bytes_written: MetricCounter

Total bytes written across all data-plane operations (counter).

§rewrites_total: MetricCounter

Total graph rewrites initiated (counter).

§op_latency: MetricHistogram

Histogram of operation latencies in microseconds.

§leases_revoked: MetricCounter

Total leases explicitly revoked (counter) — distinct from expired.

§bind_latency: MetricHistogram

Histogram of lease bind latency in microseconds.

§renew_latency: MetricHistogram

Histogram of lease renewal latency in microseconds.

§revoke_latency: MetricHistogram

Histogram of lease revocation latency in microseconds.

§teardown_latency: MetricHistogram

Histogram of teardown execution latency in microseconds.

§auth_failures: MetricCounter

Total authentication failures (counter).

§replay_rejections: MetricCounter

Total anti-replay cache rejections (counter).

§token_validations: MetricCounter

Total capability token validations (counter).

§token_failures: MetricCounter

Total capability token validation failures (counter).

§stale_access_rejections: MetricCounter

Total stale access attempts after revoke/expiry (counter).

§control_latency: MetricHistogram

Histogram of control-plane operation latencies in microseconds.

§dataplane_latency: MetricHistogram

Histogram of dataplane operation latencies in microseconds.

§tasklet_submit_latency: MetricHistogram

Histogram of tasklet submit (full dispatch) latencies in microseconds.

§tasklet_exec_latency: MetricHistogram

Histogram of tasklet execution-only latencies in microseconds.

§tasklet_submits: MetricCounter

Total tasklet submissions received (counter).

§tasklet_completions: MetricCounter

Total tasklet executions that completed successfully (counter).

§tasklet_failures: MetricCounter

Total tasklet executions that failed (counter).

§tasklet_duration: MetricHistogram

Histogram of tasklet wall-clock duration in microseconds.

§module_cache_hits: MetricCounter

Total module cache hits (counter).

§module_cache_misses: MetricCounter

Total module cache misses (counter).

§module_cache_stores: MetricCounter

Total module cache stores (counter).

§module_cache_hash_mismatches: MetricCounter

Total module cache hash mismatches (counter).

Implementations§

Source§

impl FabricMetrics

Source

pub const fn new() -> Self

Create a new metrics instance with all values at zero.

Source

pub fn global() -> &'static FabricMetrics

Access the global metrics instance.

Trait Implementations§

Source§

impl Default for FabricMetrics

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.