Repository navigation
feat(spring): Send monitor config from @Scheduled with @SentryCheckIn - #6215
Merged
Merged
Conversation
Contributor
|
📲 Install BuildsAndroid
|
This was referenced Oct 2, 2026
…figs Framework-free conversion of a 6 field cron expression, fixed rate or fixed delay into a MonitorConfig, plus period parsing, so the Spring and Quartz integrations can share it.
Return no config when day of month and day of week are both set, for cron syntax Sentry rejects, and for zones that are not IANA region IDs. Whole-hour fixed offsets map to Etc/GMT zones. Intervals use hours or days when they divide evenly.
Move the Spring day-of-week rewrite and the JVM default zone rule into core so the three Spring modules share them.
Spring and Quartz run 10-10/2 only at 10, cronsim steps to the field max.
Spring before 5.3 steps day of month */n from 0 and can run at midnight when both day fields are set; read its crons that way. Spring 5.3 runs #5 in months without a fifth weekday, so return null for it. A fixed delay drifts from any interval, so it gets no config.
Co-Authored-By: Claude <noreply@anthropic.com>
wedamija
force-pushed
the
danf/spring-checkin-scheduled-config
branch
from
October 5, 2026 22:54
ff1e1e2 to
5d745c7
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
wedamija
marked this pull request as ready for review
October 5, 2026 23:28
wedamija
requested review from
0xadam-brown,
adinauer,
markushi,
romtsn and
runningcode
as code owners
October 5, 2026 23:28
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f5ad4e. Configure here.
SUN-SUN was rewritten to 0-7, which crontab reads as every day. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
adinauer
approved these changes
Nov 5, 2026
Dropping a non-zero seconds field makes check-ins arrive up to 59s after the expected minute, which a 1 minute margin barely covers.
…like Spring Existing @SentryCheckIn users shouldn't have their monitors changed on upgrade, so sending the schedule is opt-in. Find @scheduled with Spring's own lookup so an overriding method doesn't inherit a parent's schedule.
wedamija
enabled auto-merge (squash)
November 5, 2026 18:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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.
@SentryCheckInmethods now send the schedule from their@Scheduledannotation as the monitor config, so Sentry creates the monitor on the first check-in and updates its schedule when the code changes. It's on by default, since@SentryCheckInis already an opt-in to monitoring. On upgrade, existing monitors take their schedule and time zone from@Scheduled(the JVM zone whenzoneisn't set). The change is the same insentry-spring,sentry-spring-jakartaandsentry-spring-7.Fixed-delay schedules and crons Sentry would read differently from Spring check in without a config. Heartbeat check-ins never send one.
Stacked on #6217.
Docs: getsentry/sentry-docs#19780