Repository navigation
feat(arq): Add an option to monitor arq cron jobs - #8051
Merged
Merged
Conversation
Send check-ins around each run of an arq cron job when ArqIntegration(monitor_cron_jobs=True) is set. The cron job's schedule is sent as the monitor config when it maps to a crontab in an IANA timezone, so Sentry creates the monitor and keeps it in sync. Co-Authored-By: Claude <[email protected]>
1 of 3 tasks
Co-Authored-By: Claude <[email protected]>
Contributor
Coverage Results 📊✅ 133854 passed | ⏭️ 7294 skipped | Total: 141148 | Pass Rate: 94.83% | Execution Time: 442m 55s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 94.81% (73 of 77 changed executable lines covered; target 80%). Changed files with executable lines (1)
Coverage diff@@ Coverage Diff @@
## master #8051 +/-##
==========================================
- Coverage 90.25% 90.24% -0.01%
==========================================
Files 202 202 —
Tracked lines 26660 26736 +76
Branches 9926 9968 +42
==========================================
+ Hits 24062 24127 +65
- Misses 2598 2609 +11
- Partials 1510 1514 +4Generated by Coverage Action |
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
sentrivana
approved these changes
Oct 20, 2026
sentrivana
left a comment
Collaborator
There was a problem hiding this comment.
@wedamija LGTM, thanks! Any reason this is still in draft, or can I merge?
wedamija
marked this pull request as ready for review
October 20, 2026 22:08
Member
Author
I wanted to just do a few checks before I bugged anyone to review it! All good, I'll merge it now |
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
monitor_cron_jobstoArqIntegration, matching Celery'smonitor_beat_tasks. When it's on, eachcron(...)job sends check-ins with its schedule in the worker's timezone, so Sentry creates the monitor on the first run. The slug is the job name without arq'scron:prefix. It's off by default.Jobs check in without a config when Crons can't express the schedule: a
secondother than 0, bothdayandweekdayset, or a UTC offset that isn't a whole number of hours. Before arq 0.25, the config is only sent when the system timezone is UTC.Docs: getsentry/sentry-docs#20056