Skip to content

Fix #51 -- Add argument to customize or disable Sentry monitors#55

Merged
codingjoe merged 1 commit into
mainfrom
sentry-off-switch
May 26, 2026
Merged

Fix #51 -- Add argument to customize or disable Sentry monitors#55
codingjoe merged 1 commit into
mainfrom
sentry-off-switch

Conversation

@codingjoe
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 26, 2026 13:46
@codingjoe codingjoe self-assigned this May 26, 2026
@codingjoe codingjoe force-pushed the sentry-off-switch branch from ddace85 to 72295b9 Compare May 26, 2026 13:49
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.85%. Comparing base (a747e4c) to head (34310c3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage   98.85%   98.85%           
=======================================
  Files           6        6           
  Lines         174      174           
=======================================
  Hits          172      172           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new sentry_monitor_config argument to the cron() decorator to allow per-task customization of Sentry Cron Monitor configuration or disabling Sentry monitoring entirely, with accompanying documentation and tests.

Changes:

  • Extend cron() to accept sentry_monitor_config and forward it into the Sentry integration.
  • Update Sentry integration helper to accept an override config (or disable monitoring).
  • Add tests and README docs covering disable/custom config behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crontask/__init__.py Adds the new sentry_monitor_config keyword argument to cron() and wires it into Sentry monitoring.
crontask/contrib/sentry.py Extends monitor wrapping logic to accept an explicit monitor config override (and should support disabling).
tests/test_tasks.py Adds coverage for passing sentry_monitor_config through the cron() decorator.
tests/contrib/test_sentry.py Adds unit tests for disabling monitoring and supplying a custom monitor config.
README.md Documents how to disable Sentry monitoring per task via sentry_monitor_config=False.

Comment thread crontask/__init__.py
Comment thread crontask/contrib/sentry.py
Comment thread crontask/__init__.py
Comment thread crontask/contrib/sentry.py
@codingjoe codingjoe force-pushed the sentry-off-switch branch from 72295b9 to 3692756 Compare May 26, 2026 13:57
@codingjoe codingjoe force-pushed the sentry-off-switch branch from 3692756 to 34310c3 Compare May 26, 2026 14:07
@codingjoe codingjoe merged commit 2f43082 into main May 26, 2026
14 of 15 checks passed
@codingjoe codingjoe deleted the sentry-off-switch branch May 26, 2026 14:09
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.

Disable automatic sentry cron monitoring even if sentry_sdk is installed

2 participants