Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crons): Add thresholds to monitor config payload #2842

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**:

18 changes: 15 additions & 3 deletions relay-monitors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -97,14 +97,22 @@ pub struct MonitorConfig {
#[serde(default, skip_serializing_if = "Option::is_none")]
checkin_margin: Option<u64>,

/// 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<u64>,

/// tz database style timezone string
#[serde(default, skip_serializing_if = "Option::is_none")]
timezone: Option<String>,

/// How many consecutive failed check-ins it takes to create an issue.
#[serde(default, skip_serializing_if = "Option::is_none")]
failure_issue_threshold: Option<u64>,

/// How many consecutive OK check-ins it takes to resolve an issue.
#[serde(default, skip_serializing_if = "Option::is_none")]
recovery_threshold: Option<u64>,
}

/// 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
}
}"#;