pub struct BasicMonitor { /* private fields */ }Expand description
Basic monitor implementation
Implementations§
Source§impl BasicMonitor
impl BasicMonitor
Sourcepub fn new(config: MonitoringConfig) -> Self
pub fn new(config: MonitoringConfig) -> Self
Create newmonitor
Trait Implementations§
Source§impl Monitor for BasicMonitor
impl Monitor for BasicMonitor
Source§fn record_metric(&mut self, metric: Metric) -> RuntimeResult<()>
fn record_metric(&mut self, metric: Metric) -> RuntimeResult<()>
record metrics
Source§fn get_metrics(
&self,
name: &str,
duration_seconds: u64,
) -> RuntimeResult<Vec<Metric>>
fn get_metrics( &self, name: &str, duration_seconds: u64, ) -> RuntimeResult<Vec<Metric>>
Getmetrics
Source§fn check_alerts(&mut self) -> RuntimeResult<Vec<Alert>>
fn check_alerts(&mut self) -> RuntimeResult<Vec<Alert>>
Checkalert conditions
Source§fn get_active_alerts(&self) -> Vec<&Alert>
fn get_active_alerts(&self) -> Vec<&Alert>
Getactive alerts
Source§fn acknowledge_alert(&mut self, alert_id: Uuid) -> RuntimeResult<()>
fn acknowledge_alert(&mut self, alert_id: Uuid) -> RuntimeResult<()>
acknowledge alert
Source§fn resolve_alert(&mut self, alert_id: Uuid) -> RuntimeResult<()>
fn resolve_alert(&mut self, alert_id: Uuid) -> RuntimeResult<()>
resolve alert
Auto Trait Implementations§
impl Freeze for BasicMonitor
impl RefUnwindSafe for BasicMonitor
impl Send for BasicMonitor
impl Sync for BasicMonitor
impl Unpin for BasicMonitor
impl UnwindSafe for BasicMonitor
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> ⓘ
Converts
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> ⓘ
Converts
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