You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created an example app with cron, node-cron and node-schedule
look at the log output
Expected Result
When a job from cron is executed, the Sentry logs are correct. But node-cron and node-schedule are only logged on app start. Those should also log like cron.
Actual Result
This is the log. node-schedule and node-cron produce no Sentry logs anymore.
Sentry Logger [info]: Sending checkin: node-cron_slug in_progress
Sentry Logger [info]: Sending checkin: node-cron_slug ok
Sentry Logger [info]: Sending checkin: node-schedule_slug in_progress
Sentry Logger [info]: Sending checkin: node-schedule_slug ok
Example app listening on port 3030 <-- app starts here, but node-cron and node-schedule are already sending checkins
Sentry Logger [info]: Sending checkin: cron_slug in_progress
cron: Job is running every few seconds <-- cron job runs and logs correct info about checkin
Sentry Logger [info]: Sending checkin: cron_slug ok
node-cron: Job is running every few seconds <-- node-cron job runs, but no logs
node-schedule: Job is running every few seconds <-- node-schedule job runs, but no logs
The text was updated successfully, but these errors were encountered:
Closes#11766
These tests are also in TypeScript so they check the types too.
I found that two out of three cron libraries were actually swallowing
exceptions so that they were not captured by Sentry. I added calls to
`captureException` to rectify that.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
7.112.1
Framework Version
express 4.19.2
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
cron
,node-cron
andnode-schedule
Expected Result
When a job from
cron
is executed, the Sentry logs are correct. Butnode-cron
andnode-schedule
are only logged on app start. Those should also log likecron
.Actual Result
This is the log.
node-schedule
andnode-cron
produce no Sentry logs anymore.The text was updated successfully, but these errors were encountered: