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
Today, an error is only associated with the span that was active at the time captureException(err) was called. This leads to interesting situations like the following:
functionfoo(){startSpan({name: "foo"},()=>{// <-- Error will be associated with this span, even though it was thrown in the "bar" spantry{bar();}catch(e){captureException(e);}});}functionbar(){startSpan({name: "bar"},()=>{thrownewError();});}
We could experiment with adding a try-catch to the startSpan wrappers that writes a non-enumerable span ID to errors that pass through (if they didn't have one yet), which is then picked up and preferred by the error processing pipeline over the span ID that is on the scope.
The text was updated successfully, but these errors were encountered:
I think this is worthwhile and we should just give it a try. As we discussed offline, there's this bigger picture concern of scope data in general (i.e. the active span is also just the span active on the scope) being lost if you don't manually call captureException within the scope's closure.
The gist is: Technically, we're correct in not appyling any scopes for uncaught or outside-closure-caught errors. It is however unexpected behaviour for a lot of users.
So I'd say we just do it for the span id, see how that is received and learn from it!
Description
Today, an error is only associated with the span that was active at the time
captureException(err)
was called. This leads to interesting situations like the following:We could experiment with adding a try-catch to the
startSpan
wrappers that writes a non-enumerable span ID to errors that pass through (if they didn't have one yet), which is then picked up and preferred by the error processing pipeline over the span ID that is on the scope.The text was updated successfully, but these errors were encountered: