diff --git a/CHANGELOG.md b/CHANGELOG.md index b950019cf8b..133e67ff1b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Extract size metrics for all resource spans when permitted. ([#2805](https://github.com/getsentry/relay/pull/2805)) - Allow access to more fields in dynamic sampling and metric extraction. ([#2820](https://github.com/getsentry/relay/pull/2820)) - Add Redis set based cardinality limiter for metrics. ([#2745](https://github.com/getsentry/relay/pull/2745)) +- Support issue thresholds for Cron Monitor configurations ([#2842](https://github.com/getsentry/relay/pull/2842)) **Bug Fixes**: diff --git a/relay-monitors/src/lib.rs b/relay-monitors/src/lib.rs index f7b24d69ab3..e463ca56566 100644 --- a/relay-monitors/src/lib.rs +++ b/relay-monitors/src/lib.rs @@ -97,7 +97,7 @@ pub struct MonitorConfig { #[serde(default, skip_serializing_if = "Option::is_none")] checkin_margin: Option, - /// How long (in minutes) is the checkin allowed to run for in in_rogress before it is + /// How long (in minutes) is the check-in allowed to run for in in_progress before it is /// considered failed. #[serde(default, skip_serializing_if = "Option::is_none")] max_runtime: Option, @@ -105,6 +105,14 @@ pub struct MonitorConfig { /// tz database style timezone string #[serde(default, skip_serializing_if = "Option::is_none")] timezone: Option, + + /// How many consecutive failed check-ins it takes to create an issue. + #[serde(default, skip_serializing_if = "Option::is_none")] + failure_issue_threshold: Option, + + /// How many consecutive OK check-ins it takes to resolve an issue. + #[serde(default, skip_serializing_if = "Option::is_none")] + recovery_threshold: Option, } /// The trace context sent with a check-in. @@ -289,7 +297,9 @@ mod tests { }, "checkin_margin": 5, "max_runtime": 10, - "timezone": "America/Los_Angles" + "timezone": "America/Los_Angles", + "failure_issue_threshold": 3, + "recovery_threshold": 1 } }"#; @@ -312,7 +322,9 @@ mod tests { }, "checkin_margin": 5, "max_runtime": 10, - "timezone": "America/Los_Angles" + "timezone": "America/Los_Angles", + "failure_issue_threshold": 3, + "recovery_threshold": 1 } }"#;