Skip to content

feat(quartz): Send monitor config from the trigger with check-ins - #6216

Draft
wedamija wants to merge 10 commits into
danf/spring-checkin-scheduled-configfrom
danf/quartz-cron-config
Draft

wedamija wants to merge 10 commits into
danf/spring-checkin-scheduled-configfrom
danf/quartz-cron-config

Conversation

@wedamija

@wedamija wedamija commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Stacked on #6215 (Spring), which is stacked on #6217 (core MonitorConfigUtils). Merge those first.

📜 Description

With SentryJobListener.SENTRY_UPSERT_MONITOR_CONFIG_KEY set to true in the job data (opt-in), SentryJobListener sends a monitor config from the job's trigger with the in-progress check-in, like #6215 does for Spring.

  • CronTrigger: the cron, converted by MonitorConfigUtils, with the trigger's time zone. A * year field is dropped (any other year sends no config), and Quartz's day-of-week numbers and names (1–7 from Sunday) are shifted to crontab's 0–6. Quartz ignores a step after a name (SUN/2 is every Sunday), so that sends no config.
  • SimpleTrigger that repeats forever: an interval when it's a whole number of minutes.
  • Triggers with a Calendar send no config, as Sentry can't express the exclusions.
  • Anything else sends no config, as today.

💡 Motivation and Context

Without a config, check-ins for monitors that weren't created in Sentry are dropped. The trigger already has the schedule.

💚 How did you test it?

New SentryJobListenerTest (the module had no tests).

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Docs: getsentry/sentry-docs#19777

Derive a monitor config from the job's trigger and send it with the
in-progress check-in, so Sentry can create or update the monitor from
code. Cron triggers are sent as a crontab with the trigger's time zone,
and simple triggers that repeat every whole number of minutes as an
interval. Other triggers send no config. Opt out per job by setting
sentry-upsert-monitor-config to false in the job data.
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d7a2468

@sentry

sentry Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.59.0 (1) release

⚙️ sentry-android Build Distribution Settings

…nfig' into danf/quartz-cron-config

# Conflicts:
#	CHANGELOG.md
Send the monitor config only when sentry-upsert-monitor-config is true
in the job data.
Steps from a single day of week stop on Saturday, names with L become
numbers, and only SimpleTriggers that repeat forever send an interval.
Derive the config before forking scopes and store the scope token first
so it is always closed.
Quartz ignores a step after a day or month name, and Sentry can't
express calendar exclusions, so send no config for either. 7/n only
fires on Saturday.

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