Package + Version
Version:
sentry.javascript.node
Description
Describe your issue in detail, ideally, you have a reproducible demo that you can show.
I can't understand why the following code:
constmain=async()=>{Sentry.addBreadcrumb({message: 'first'})Sentry.captureException(newError('err1'))Sentry.addBreadcrumb({message: 'second'})Sentry.captureException(newError('err2'))Sentry.addBreadcrumb({message: 'third'})Sentry.captureException(newError('err3'))}main()produces 3 exceptions with all three breadcrumbs. I'd expect:
- Error err1 to have the breadcrumb 'first'
- Error err2 to have the breadcrumb 'first' and 'second'
- Error err3 to have the breadcrumb 'first', 'second' and 'third'.
I believe this is a bug, because I can achieve my desired behaviour using captureMessage.
constmain=async()=>{Sentry.addBreadcrumb({message: 'first'})Sentry.captureMessage(newError('err1'))Sentry.addBreadcrumb({message: 'second'})Sentry.captureMessage(newError('err2'))Sentry.addBreadcrumb({message: 'third'})Sentry.captureMessage(newError('err3'))}main()Here the captured messages have the proper breadcrumbs that I want. In fact, I'd go with captureMessage, but with it I loose stack traces, and it's less semantic. So what's up with captureException? Am I missing something? The docs don't explain this behaviour.
Package + Version
@sentry/browser@sentry/noderaven-jsraven-node(raven for node)Version:
sentry.javascript.node
Description
Describe your issue in detail, ideally, you have a reproducible demo that you can show.
I can't understand why the following code:
produces 3 exceptions with all three breadcrumbs. I'd expect:
I believe this is a bug, because I can achieve my desired behaviour using captureMessage.
Here the captured messages have the proper breadcrumbs that I want. In fact, I'd go with
captureMessage, but with it I loose stack traces, and it's less semantic. So what's up withcaptureException? Am I missing something? The docs don't explain this behaviour.