Skip to content

feat(cron): Support failure_issue_threshold and recovery_threshold in MonitorConfig - #3174

Open
ammadakram wants to merge 1 commit into
getsentry:masterfrom
ammadakram:pr/issue-2668
Open

ammadakram wants to merge 1 commit into
getsentry:masterfrom
ammadakram:pr/issue-2668

Conversation

@ammadakram

Copy link
Copy Markdown

Fixes #2668

What changed

Sentry::Cron::MonitorConfig now accepts failure_issue_threshold and recovery_threshold (Sentry's monitor-config names for failure/recovery tolerance), exposes them as accessors, and includes them in #to_h (nil values are omitted as before). They work with from_crontab / from_interval, so sentry_monitor_check_ins picks them up.

No global defaults were added to Cron::Configuration; happy to add those if wanted.

Tests

  • bin/test --gem sentry-ruby spec/sentry/cron/monitor_config_spec.rb spec/sentry/cron/monitor_check_ins_spec.rb — 36 examples, 0 failures
  • New spec fails without the change (ArgumentError: unknown keywords) and passes with it.
  • mise run lint on the changed files — no offenses.
  • Full suite not run.

AI assistance

Claude helped draft the change and tests; the diff was reviewed and tests run locally.

🤖 Generated with Claude Code

… MonitorConfig

Fixes getsentry#2668

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support setting cron monitor tolerances

1 participant