Skip to content

feat(jobs): support for good job cron check-ins - #3200

Merged
solnic merged 20 commits into
masterfrom
feat/good-job-cron-check-ins
Nov 16, 2026
Merged

solnic merged 20 commits into
masterfrom
feat/good-job-cron-check-ins

Conversation

@solnic

@solnic solnic commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

This branch is built on #3147.

@solnic
solnic added this pull request to stack #3201 November 11, 2026 12:55
@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch 2 times, most recently from 6231a01 to cc72ec7 Compare November 11, 2026 13:40
Base automatically changed from feat/good-job-postgres-test-infra to master November 12, 2026 12:43
@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch 3 times, most recently from 4bf324f to 61b4561 Compare November 12, 2026 14:25
@solnic
solnic marked this pull request as ready for review November 12, 2026 15:17
wedamija and others added 13 commits November 16, 2026 10:11
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>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Keys that map to the same slug, like long keys cut at 50 characters,
would share one monitor with two schedules. Skip all of them and warn,
and log at debug level when a schedule can't be expressed.

Co-Authored-By: Claude <noreply@anthropic.com>
GoodJob sets its cron key only while an entry enqueues and clears it
while jobs run, so a job a cron job enqueues inline isn't tagged.
Zoneless schedules use the app's time zone rather than whatever zone
the enqueue runs under.
Excluded entries, unconvertible or proc schedules, and jobs that call
sentry_monitor_check_ins don't send check-ins for the slug, so they
shouldn't stop another entry from being monitored. The schedule check
runs first so unmonitorable entries don't get the rename warning.
FugitSchedule.from_cron only returns a config with both a crontab and a
time zone.
Other jobs enqueued during a cron enqueue, a failure while building the
monitor, callable classes, unconfigured MonitorCheckIns, and a nil
exclude list.
@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch from 61b4561 to 64a9af1 Compare November 16, 2026 09:11
@solnic
solnic requested a review from a team as a code owner November 16, 2026 09:11

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch from 16fb4f7 to 68998b4 Compare November 16, 2026 11:36

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch from 7323727 to b014966 Compare November 16, 2026 12:39

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@solnic
solnic force-pushed the feat/good-job-cron-check-ins branch from ea76dcf to 4e07d34 Compare November 16, 2026 14:47

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e07d34. Configure here.

@solnic
solnic merged commit eca2409 into master Nov 16, 2026
172 checks passed
@solnic
solnic deleted the feat/good-job-cron-check-ins branch November 16, 2026 15:30
@amkisko

amkisko commented Nov 17, 2026

Copy link
Copy Markdown

Funny or not, Claude gets attribution, amkisko does not. :D What a time or has it been always like that.

dingsdax added a commit to getsentry/sentry-changelog that referenced this pull request Nov 18, 2026
Adds a changelog post for [sentry-ruby
7.3.0](https://github.com/getsentry/sentry-ruby/releases/tag/7.3.0), so
Ruby users hear about the release's new features in the changelog and in
Sentry's "What's New" panel (scoped to Ruby, Rails, and Rack orgs) and
not only in the GitHub release notes.

The post is framed around background work that fails quietly, and each
section leads with the problem it solves:

- **Know when a GoodJob cron job fails or never runs**:
`config.enabled_patches << :good_job_cron` puts every GoodJob cron entry
under Crons monitoring (getsentry/sentry-ruby#3200)
- **See which feature flags were on when an error happened**:
`Sentry.add_feature_flag` attaches flag evaluations to errors and spans
(getsentry/sentry-ruby#3108)
- **Spot jobs piling up in the queue**: ActiveJob, Sidekiq, and Resque
jobs report queue wait time and payload size for the Queues dashboard
(getsentry/sentry-ruby#3133)

It closes with `Sentry.logger` block support
(getsentry/sentry-ruby#3178), then links the full release notes. The new
job extensions API (getsentry/sentry-ruby#3129) is left out because it
only matters to people who maintain job backends. Nothing breaks.

Open decisions:
- The entry is `published: false`, so merging only creates it. To go
live, set `published: true` before merge or publish it from the admin
UI.
- `author` is left unset because I couldn't confirm which email belongs
to an existing changelog user. Add one if you want the post attributed.

<!-- junior-request-attribution:start -->
via @dingsdax.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3Ab5614f77a180622dc700158a -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3Ab5614f77a180622dc700158a)
[[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ab5614f77a180622dc700158a/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: johdax <114897+dingsdax@users.noreply.github.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.

4 participants