Repository navigation
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 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
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.
Description
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 opt-in check-ins for arq cron jobs (
cron(...)incron_jobs), modelled onCeleryIntegration(monitor_beat_tasks=True, exclude_beat_tasks=[...]):in_progresswhen a cron job starts andokorerrorwhen it ends.name, without arq's defaultcron:prefix (socron(send_report)becomessend_report).exclude_cron_jobstakes regexes, matched likeexclude_beat_tasks.month/day/weekday/hour/minutefields, in the worker'stimezone. Fixed UTC offsets (arq's default is the system's offset at startup) are sent asEtc/GMT±N. Before arq 0.25, cron jobs run in local time, so the config is only sent when the system timezone is UTC.secondother than 0, bothdayandweekdayset (arq requires both to match, cron either), or a timezone with no IANA name (such as a UTC+05:30 offset).run_at_startupruns are checked in like any other run.Issues
Docs: getsentry/sentry-docs#20056