Skip to content

feat(spring): Monitor all @Scheduled methods in Spring Boot 3 - #6275

Draft
wedamija wants to merge 2 commits into
danf/spring-checkin-scheduled-configfrom
danf/spring-monitor-scheduled-tasks
Draft

wedamija wants to merge 2 commits into
danf/spring-checkin-scheduled-configfrom
danf/spring-monitor-scheduled-tasks

Conversation

@wedamija

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 a Spring Boot 3 switch that monitors every @Scheduled method, so methods no longer each need @SentryCheckIn. Off by default.

sentry.monitor-scheduled-tasks=true
# optional: ClassName.methodName, exact or as a regex
sentry.exclude-scheduled-tasks=ReportJobs.sendDailyReport,Internal.*
  • The slug is the class and method name in kebab case, e.g. ReportJobs.sendDailyReport becomes report-jobs-send-daily-report. Nested classes include the outer class. Slugs over 50 characters are shortened with a hash suffix so they stay unique.
  • The schedule comes from @Scheduled using the logic from feat(spring): Send monitor config from @Scheduled with @SentryCheckIn #6215. Methods whose schedule can't be expressed in the Crons schedule format (fixed delay, several schedules) still check in, without a config.
  • Methods with @SentryCheckIn keep their own slug and settings and are not checked in twice.
  • Final classes and final methods are skipped, since CGLIB can't proxy them.

Spring Boot 2 and 4 follow in stacked PRs.

Stacked on #6215.

wedamija and others added 2 commits October 16, 2026 17:56
…tor-scheduled-tasks

Adds sentry.monitor-scheduled-tasks and sentry.exclude-scheduled-tasks to
Spring Boot 3. Methods without @SentryCheckIn get a slug from the class
and method name and send their @scheduled schedule as the monitor config.

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

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 358f88a

@sentry

sentry Bot commented Oct 17, 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

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