getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.68k stars 1.49k forks source link

fix(node): Fix cron instrumentation and add tests #11811

Closed timfish closed 1 week ago

timfish commented 3 weeks ago

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.