pub struct AlertConfig {
pub enabled: bool,
pub consecutive_failures_threshold: u32,
pub failure_rate_threshold: f64,
pub slow_execution_threshold_ms: Option<u64>,
pub alert_on_missed_schedule: bool,
pub alert_on_stuck: bool,
}Expand description
Alert configuration for task monitoring
Fields§
§enabled: boolEnable alerting for this task
consecutive_failures_threshold: u32Threshold for consecutive failures before alerting
failure_rate_threshold: f64Threshold for failure rate (0.0 to 1.0) before alerting
slow_execution_threshold_ms: Option<u64>Threshold for slow execution (milliseconds)
alert_on_missed_schedule: boolEnable alerts for missed schedules
alert_on_stuck: boolEnable alerts for task stuck
Implementations§
Source§impl AlertConfig
impl AlertConfig
Sourcepub fn with_consecutive_failures_threshold(self, threshold: u32) -> Self
pub fn with_consecutive_failures_threshold(self, threshold: u32) -> Self
Set consecutive failures threshold
Sourcepub fn with_failure_rate_threshold(self, threshold: f64) -> Self
pub fn with_failure_rate_threshold(self, threshold: f64) -> Self
Set failure rate threshold
Sourcepub fn with_slow_execution_threshold_ms(self, threshold_ms: u64) -> Self
pub fn with_slow_execution_threshold_ms(self, threshold_ms: u64) -> Self
Set slow execution threshold
Sourcepub fn without_missed_schedule_alerts(self) -> Self
pub fn without_missed_schedule_alerts(self) -> Self
Disable missed schedule alerts
Sourcepub fn without_stuck_alerts(self) -> Self
pub fn without_stuck_alerts(self) -> Self
Disable stuck task alerts
Trait Implementations§
Source§impl Clone for AlertConfig
impl Clone for AlertConfig
Source§impl Debug for AlertConfig
impl Debug for AlertConfig
Source§impl Default for AlertConfig
impl Default for AlertConfig
Source§impl<'de> Deserialize<'de> for AlertConfig
impl<'de> Deserialize<'de> for AlertConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AlertConfig
impl RefUnwindSafe for AlertConfig
impl Send for AlertConfig
impl Sync for AlertConfig
impl Unpin for AlertConfig
impl UnsafeUnpin for AlertConfig
impl UnwindSafe for AlertConfig
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