Skip to content

feat(quartz): Add an option to monitor all scheduled jobs - #5741

Merged
jamescrosswell merged 61 commits into
mainfrom
danf/quartz-bulk-cron
Oct 29, 2026
Merged

jamescrosswell merged 61 commits into
mainfrom
danf/quartz-bulk-cron

Conversation

@wedamija

@wedamija wedamija commented Oct 17, 2026 •

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 SentryQuartzOptions.MonitorAllJobs, which monitors every scheduled job without adding [SentryMonitorSlug] to each job class, and ExcludedJobs to skip some by name, full key or regex. The monitor slug comes from the job key. Jobs with [SentryMonitorSlug] keep their own settings. Off by default.

services.AddQuartz(quartz =>
{
    quartz.AddSentry(options =>
    {
        options.MonitorAllJobs = true;
        options.ExcludedJobs.Add("reports.Adhoc");
        options.ExcludedJobs.Add(new Regex(@"^maintenance\."));
    });
});

Only runs fired by a trigger whose schedule Sentry can represent are monitored, so one-off runs like TriggerJob, triggers with a calendar and cron expressions Sentry can't express are skipped, as in sentry-python. Jobs with several triggers on different schedules, or that share a monitor slug with a job on a different schedule, are skipped too, since their monitor config can't be built.

Stacked on #5505, through the danf/quartz-5505-rebased branch since that PR's head is on a fork.

michaelmairegger and others added 30 commits October 8, 2026 11:14
… dependencies and streamlining SentryCronJobListener options handling
… collection parameter and streamlining option configuration
…dSentryScope method, update SentryMetricsMiddleware to support configurable options
The format-code workflow can't push its auto-fix to a fork branch, so it
fails the check instead. Applying the fix here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every package needs a name/packageUrl/mainDocsUrl entry so craft can create
its registry entry on first publish; a missing `name` fails the whole
registry target rather than just that package.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
wedamija added a commit to getsentry/sentry-docs that referenced this pull request Nov 16, 2026
## DESCRIBE YOUR PR

The .NET Quartz.NET Crons page now covers `MonitorAllJobs` and
`ExcludedJobs`, which monitor every scheduled job without the
`SentryMonitorSlug` attribute.

SDK PR: getsentry/sentry-dotnet#5741

Stacked on #19790.

## IS YOUR CHANGE URGENT?

- [ ] 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 <noreply@anthropic.com>
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
This was referenced Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants