Repository navigation
Conversation
Sends check-ins for GoodJob cron entries when the :good_job_cron patch is enabled, using the cron key as the slug and the entry's schedule as the monitor config. Keys can be skipped with config.rails.good_job_exclude_cron_jobs. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of a series adding automatic Crons monitoring for the most-used job schedulers in each SDK. Check-ins for a monitor that doesn't exist yet are dropped, so today each monitor has to be created by hand with its schedule copied from the code. Sending the job's schedule as the monitor config lets Sentry create the monitor and keep it in sync.
This adds an opt-in patch to sentry-rails for GoodJob cron entries (
config.good_job.cron):Entries in
good_job_exclude_cron_jobsare skipped; strings and symbols match the cron key, regexps are matched against it.Each run sends in-progress and ok/error check-ins, with the cron key as the slug and the entry's schedule as the monitor config.
around_perform, so retries check in too. Same approach as the Solid Queue patch in feat(crons): Add Solid Queue recurring task monitoring #3140.Time.zone.cronis a proc check in without a config.sentry_monitor_check_insare left alone.Builds on the community PR #2751 by @amkisko, which proposed a sentry-good_job integration. This version lives in sentry-rails next to the Solid Queue patch and reuses
Sentry::Cron::FugitSchedule.Stacked on #3141. The lockfile changes only add
good_jobas a dev dependency for the spec (Rails 6.1+, Ruby 3.0+).