Hi all, hoping someone can shine a light on how the scoping of spans works in javascript? I'm using Angular 11, and instrumenting some actions that aren't synchronous. E.g. an event gets dispatched via rxjs and I have to store the span object so I can end it in my success event handler.
I've noticed a few different times where a child span either isn't captured, or is captured directly as a child of the pageload, and not an action it should be scoped underneath.
I'm sure it's something to do with how callbacks and js scoping work because there are times the SDK doesn't think there's an active span when there is, but would appreciate if someone could explain how that works so I can figure out if there's something I can do around this 😅