//! test_duration alert/recovery messages. Domain half of the Alerter split; //! shared dispatch/cooldown plumbing lives in the parent module. use tracing::instrument; use super::{AlertCategory, AlertMeta, Alerter}; impl Alerter { #[instrument(skip_all)] pub async fn send_test_duration_drift_alert( &self, target: &str, label: &str, drift_message: &str, ) { let alert_key = format!("test_duration:{target}"); let subject = format!("[PoM] {target}: test duration drift detected"); let body = format!( "Target: {label} ({target})\n\ {drift_message}\n\ Instance: {}\n\ Time: {}\n\n\ - PoM", self.instance_name, chrono::Utc::now().to_rfc3339(), ); self.fire_failure( &subject, &body, "medium", "pom-test-duration", Some(target), AlertMeta { key: &alert_key, category: AlertCategory::TestDurationDrift, from: None, to: None, error: Some(drift_message), }, ) .await; } }