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.