Skip to content

feat(spring): Send monitor config from @Scheduled with @SentryCheckIn - #6215

Open
wedamija wants to merge 5 commits into
danf/monitor-config-utilsfrom
danf/spring-checkin-scheduled-config
Open

wedamija wants to merge 5 commits into
danf/monitor-config-utilsfrom
danf/spring-checkin-scheduled-config

Conversation

@wedamija

@wedamija wedamija commented Oct 2, 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.

@SentryCheckIn methods now send the schedule from their @Scheduled annotation 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 @SentryCheckIn is already an opt-in to monitoring. On upgrade, existing monitors take their schedule and time zone from @Scheduled (the JVM zone when zone isn't set). The change is the same in sentry-spring, sentry-spring-jakarta and sentry-spring-7.

@Scheduled(cron = "0 0 * * * *")
@SentryCheckIn("hourly-sync")
void sync() { ... }

// keep managing the schedule in Sentry
@SentryCheckIn(value = "hourly-sync", upsertMonitorConfig = false)

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

@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 5db58a4

@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

Co-Authored-By: Claude <noreply@anthropic.com>
@wedamija
wedamija force-pushed the danf/spring-checkin-scheduled-config branch from ff1e1e2 to 5d745c7 Compare October 5, 2026 22:54
Co-Authored-By: Claude <noreply@anthropic.com>
@wedamija
wedamija marked this pull request as ready for review October 5, 2026 23:28
Co-Authored-By: Claude <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

wedamija and others added 2 commits October 5, 2026 17:43
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