pub struct SupervisorMetrics {
pub restarts_total: AtomicU64,
pub active_services: AtomicU64,
pub spawned_total: AtomicU64,
pub terminated_total: AtomicU64,
pub circuit_breaker_trips: AtomicU64,
}Expand description
Atomic counters for supervisor-level metrics.
When the prometheus feature is enabled, these are mirrored into the
crate-local prometheus registry available via the prometheus
submodule. Without the feature this is the only metrics surface.
Fields§
§restarts_total: AtomicU64Total service restarts (clean-exit + on-failure cycles).
active_services: AtomicU64Currently-alive services (not yet in Terminated).
spawned_total: AtomicU64Total services ever spawned, including restarts.
terminated_total: AtomicU64Total services that have reached Terminated.
circuit_breaker_trips: AtomicU64Total times any service’s circuit breaker has tripped.
Implementations§
Source§impl SupervisorMetrics
impl SupervisorMetrics
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Snapshot the current metric values.
Trait Implementations§
Source§impl Debug for SupervisorMetrics
impl Debug for SupervisorMetrics
Source§impl Default for SupervisorMetrics
impl Default for SupervisorMetrics
Source§fn default() -> SupervisorMetrics
fn default() -> SupervisorMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SupervisorMetrics
impl RefUnwindSafe for SupervisorMetrics
impl Send for SupervisorMetrics
impl Sync for SupervisorMetrics
impl Unpin for SupervisorMetrics
impl UnsafeUnpin for SupervisorMetrics
impl UnwindSafe for SupervisorMetrics
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
Mutably borrows from an owned value. Read more