pub struct ErrorMonitor { /* private fields */ }
Expand description
Error monitor for tracking and alerting
Implementations§
Source§impl ErrorMonitor
impl ErrorMonitor
Sourcepub fn new(metrics: Arc<dyn Metrics>, alert_thresholds: ErrorThresholds) -> Self
pub fn new(metrics: Arc<dyn Metrics>, alert_thresholds: ErrorThresholds) -> Self
Create a new error monitor
Sourcepub async fn record_error(&self, error: &AiLibError, context: &ErrorContext)
pub async fn record_error(&self, error: &AiLibError, context: &ErrorContext)
Record an error and check for alerts
Auto Trait Implementations§
impl Freeze for ErrorMonitor
impl !RefUnwindSafe for ErrorMonitor
impl Send for ErrorMonitor
impl Sync for ErrorMonitor
impl Unpin for ErrorMonitor
impl !UnwindSafe for ErrorMonitor
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