Skip to content

feat(node): Add Crons monitoring for BullMQ job schedulers - #25472

Draft
wedamija wants to merge 4 commits into
developfrom
danf/bullmq-cron-monitors
Draft

wedamija wants to merge 4 commits into
developfrom
danf/bullmq-cron-monitors

Conversation

@wedamija

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

This adds Sentry.cron.instrumentBullMQWorker, next to the existing cron, node-cron and node-schedule helpers. It listens to the worker's events instead of wrapping the processor, so sandboxed processors work too. Each job from a job scheduler sends check-ins under the scheduler id, with its pattern (in tz, or the server's time zone) or every as the monitor config.

const worker = new Worker('reports', processor, { connection });
Sentry.cron.instrumentBullMQWorker(worker, {
  excludeJobSchedulers: ['cache-warmup', /^tmp-/],
});

Schedules Crons can't express, like sub-minute intervals or ?/W syntax, and schedulers with limit or endDate check in without a config. Legacy repeatable jobs (queue.add with repeat) aren't monitored.

pnpm-workspace.yaml adds msgpackr-extract to allowBuilds, which bullmq needs for the integration tests.

Docs: getsentry/sentry-docs#20053

wedamija and others added 2 commits October 19, 2026 17:44
`Sentry.cron.instrumentBullMQWorker(worker)` sends check-ins for every job
the worker runs from a job scheduler, using the scheduler id as the monitor
slug and its `pattern` or `every` as the monitor schedule.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@wedamija
wedamija force-pushed the danf/bullmq-cron-monitors branch from dd87bd3 to b7b621e Compare October 20, 2026 00:51
Co-Authored-By: Claude <noreply@anthropic.com>
@wedamija wedamija changed the title feat(node): Add Crons check-ins for BullMQ job schedulers feat(node): Add Crons monitoring for BullMQ job schedulers Oct 20, 2026
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