Skip to content

feat: add Sentry.Quartz for cron monitoring of Quartz.NET jobs - #5668

Draft
wedamija wants to merge 2 commits into
mainfrom
danf/quartz-crons
Draft

wedamija wants to merge 2 commits into
mainfrom
danf/quartz-crons

Conversation

@wedamija

@wedamija wedamija commented Oct 3, 2026

Copy link
Copy Markdown
Member

Adds Sentry.Quartz, a Quartz.NET job listener that captures check-ins for each job run.

services.AddQuartz(q => q.AddJobListener<SentryJobListener>());
  • In-progress when a job starts; ok or error with the run time when it finishes. Vetoed jobs send nothing.
  • Slug: the job key, slugified (billing.PricingUpdate → billing-pricingupdate), or SentryMonitorSlug from the job data map. Quartz matchers pick which jobs to monitor.
  • Monitor config is on by default (SendMonitorConfig). Cron triggers are converted to a crontab only when every field means the same in Sentry. Simple triggers that repeat forever send an interval. Calendars, multiple triggers per monitor, and other schedules go out without config.
  • Quartz 3.6+ (3.x only; 4.x changed the listener API).

A release-registry entry is needed before the first release.

Docs: getsentry/sentry-docs#19790

SentryJobListener captures an in-progress check-in when a job starts
and an ok or error check-in with the run time when it finishes. The
slug is the job key, or SentryMonitorSlug from the job data map.

The in-progress check-in carries the trigger's schedule as monitor
config: cron triggers that Sentry's crontab can represent exactly, with
their time zone, and simple triggers that repeat forever at whole
minutes, hours or days. Calendars, jobs with several triggers sharing
a monitor, and other schedules go out without config.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.62420% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.18%. Comparing base (ea7fa3a) to head (2145e11).

Files with missing lines Patch % Lines
src/Sentry.Quartz/SentryJobListener.cs 79.68% 7 Missing and 6 partials ⚠️
src/Sentry.Quartz/TriggerSchedule.cs 91.30% 3 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5668      +/-   ##
==========================================
+ Coverage   74.93%   75.18%   +0.25%     
==========================================
  Files         515      518       +3     
  Lines       18975    19132     +157     
  Branches     3695     3749      +54     
==========================================
+ Hits        14219    14385     +166     
+ Misses       3876     3845      -31     
- Partials      880      902      +22     

☔ View full report in Codecov by Harness.
📢 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.

The linux-musl CI containers have no time zone database, so lookups
of Europe/Berlin fail there.

Co-Authored-By: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant