GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(rq): Add an option to monitor rq-scheduler jobs by wedamija · Pull Request #8053 · getsentry/sentry-python

Conversation

@wedamija

@wedamija wedamija commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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_jobs to RqIntegration for recurring jobs from rq-scheduler's scheduler.cron(...) and scheduler.schedule(..., interval=...). Only the worker needs the option, and it sends the cron string or interval as the monitor config. The slug is the job id, and jobs without one share a monitor named after the function's import path. It's off by default.

sentry_sdk.init(
    integrations=[RqIntegration(monitor_cron_jobs=True, exclude_cron_jobs=["cleanup"])],
)

Jobs aren't monitored when Sentry may read the cron string differently (6 fields, @daily, MON, both day fields set), the interval isn't whole minutes, the job has repeat, or the worker's local timezone isn't UTC. RQ's built-in rq cron scheduler isn't covered.

The rq test envs now install rq-scheduler for RQ 2.x.

Docs: getsentry/sentry-docs#20058

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wedamija @claude
feat(rq): Add cron monitoring for rq-scheduler jobs
566e9f0
Send check-ins around each run of a job that rq-scheduler re-enqueues
(scheduler.cron() and scheduler.schedule(interval=...)) when
RqIntegration(monitor_cron_jobs=True) is set. The schedule is sent as the
monitor config when Sentry reads it the same way, so Sentry creates the
monitor and keeps it in sync. One-off jobs (enqueue_at, enqueue_in) are
not monitored.

Co-Authored-By: Claude <[email protected]>
@wedamija wedamija mentioned this pull request Oct 17, 2026
docs(crons): Add RQ setup for Python getsentry/sentry-docs#20058
Merged
1 of 3 tasks
@wedamija @claude
fix(rq): Type check-in id as optional
9bca50d
Co-Authored-By: Claude <[email protected]>
@github-actions

github-actions Bot commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 134037 passed | ⏭️ 7317 skipped | Total: 141354 | Pass Rate: 94.82% | Execution Time: 441m 7s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +3157
Passed Tests 📈 +3174
Failed Tests 📉 -58
Skipped Tests 📈 +41

➖ Removed Tests (58)

View removed tests
  • test_input_attributes_nonstreaming_chat[False-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-False-False]
    • File: tests.integrations.mistral.test_mistral

All tests are passing successfully.

✅ Patch coverage is 98.96% (95 of 96 changed executable lines covered; target 80%).
Project statement coverage is 90.27% (up 0.01 percentage points from base (0f7acd5) to head (08d6a3d)).

Changed files with executable lines (2)
File Patch coverage Changed executable lines
sentry_sdk/integrations/rq.py 98.88% 88/89 covered; missed: 174; partial branches: 95, 130, 170, 322
sentry_sdk/crons/utils.py 100.00% 7/7 covered
Coverage diff
@@            Coverage Diff             @@
##        master     #8053       +/-##
==========================================
+ Coverage    90.26%    90.27%    +0.01%
==========================================
  Files          202       203        +1
  Tracked lines     26660     26813      +153
  Branches      9926     10008       +82
==========================================
+ Hits         24062     24204      +142
- Misses        2598      2609       +11
- Partials      1510      1515        +5

Generated by Coverage Action

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sentry-warden[bot]
sentry-warden Bot reviewed Oct 17, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

sentry-warden[bot]
sentry-warden Bot reviewed Oct 17, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@wedamija @claude
feat(rq): Warn when a scheduled job has no explicit id
6f68bc3
Co-Authored-By: Claude <[email protected]>
sentry-warden[bot]
sentry-warden Bot reviewed Oct 17, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

sentrivana
sentrivana requested changes Oct 20, 2026
View reviewed changes

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ty, left a few comments 🙏🏻

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@wedamija wedamija changed the title feat(rq): Add cron monitoring for rq-scheduler jobs feat(rq): Add an option to monitor rq-scheduler jobs Oct 20, 2026
@wedamija @claude
fix(rq): Only send cron strings Sentry reads the same way
d1549d3
rq-scheduler's crontab parser and Sentry disagree on `n/step` in day of
week, single-value ranges like `0-0` and wrapping ranges like `5-1`
(which Sentry rejects). Those jobs now check in without a config.

Also move the interval conversion to `sentry_sdk/crons/utils.py` (same
helper as the APScheduler integration), drop the warning for jobs
without an `id`, inline the closing check-in and move the module
constants up.

Co-Authored-By: Claude <[email protected]>
sentry-warden[bot]
sentry-warden Bot reviewed Oct 20, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@wedamija @claude
fix(rq): Don't monitor jobs with unsupported schedules
02f1c73
Match the Celery beat integration: skip jobs whose schedule can't be
expressed as a Sentry Crons monitor config instead of sending check-ins
without one. Also close the in_progress check-in with an error if
perform_job raises.

Co-Authored-By: Claude <[email protected]>
sentry-warden[bot]
sentry-warden Bot reviewed Oct 20, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/rq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@wedamija @claude
ref(rq): Inline the closing check-in
08d6a3d
Close the check-in in a finally block instead of a helper, and keep the
job body in place.

Co-Authored-By: Claude <[email protected]>
@wedamija
wedamija requested a review from sentrivana October 20, 2026 23:06
@wedamija
wedamija marked this pull request as ready for review October 20, 2026 23:06
@wedamija
wedamija requested a review from a team as a code owner October 20, 2026 23:06
sentrivana
sentrivana approved these changes Oct 21, 2026
View reviewed changes

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🙏🏻

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sentrivana
sentrivana merged commit 4e19592 into master Oct 21, 2026
168 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@sentrivana
sentrivana deleted the danf/rq-scheduler-crons branch October 21, 2026 10:25
@wedamija wedamija mentioned this pull request Oct 21, 2026
fix(arq): Don't monitor cron jobs with unsupported schedules #8098
Merged
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

PY-3032

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sentrivana pushed a commit that referenced this pull request Oct 22, 2026
@wedamija @claude
fix(arq): Don't monitor cron jobs with unsupported schedules (#8098)
68bc4dd
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 is a quick fix to keep the arq integration behaviour in line with
how other integrations work. Sorry for the churn!

Follow-up to #8051. Cron jobs whose schedule Crons can't express are no
longer monitored, instead of checking in without a config. This matches
Celery beat, and the Huey and RQ integrations from #8052 and #8053.

Docs: getsentry/sentry-docs#20056

Co-authored-by: Claude <[email protected]>
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Oct 22, 2026
publish: getsentry/[email protected] getsentry/publish#9970
Closed
6 tasks done
sentrivana added a commit to getsentry/sentry-docs that referenced this pull request Oct 22, 2026
@wedamija @claude @sentrivana
docs(crons): Add RQ setup for Python (#20058)
24fdeaa
## DESCRIBE YOUR PR

Adds an RQ section to the Python Crons setup page: turning on
`monitor_cron_jobs` for rq-scheduler jobs, how the slug is picked, and
which jobs are monitored.

SDK PR: getsentry/sentry-python#8053

Stacked on #20057.

Merge after the SDK release that includes it.

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Ivana Kellyer <[email protected]>
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Oct 27, 2026
publish: getsentry/[email protected] getsentry/publish#10029
Closed
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sentry-warden sentry-warden[bot] sentry-warden[bot] left review comments
@sentrivana sentrivana sentrivana approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@wedamija @sentrivana
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.