-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(browser): Improve active span handling for browserTracingIntegration
#14959
Conversation
6b99199
to
7547547
Compare
size-limit report 📦
|
❌ 19 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
@@ -494,8 +491,7 @@ function registerInteractionListener( | |||
const registerInteractionTransaction = (): void => { | |||
const op = 'ui.action.click'; | |||
|
|||
const activeSpan = getActiveSpan(); | |||
const rootSpan = activeSpan && getRootSpan(activeSpan); | |||
const rootSpan = getActiveIdleSpan(client); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m/h: I'm a bit concerned about this as we don't check the scope anymore for the active span. Which means we diverge here from other places where we do something similar. Also, paired with my other comment, we'd need to ensure that we unset the span on the client whenever the span ends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I adjusted the idle spans to be unset when the idle (route) span ends. Then, I think this should be OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit unusual to set a span on the client but if we get it working, I think it's reasonable. Isolation in multi-client setups is an advantage
3720405
to
c470dd3
Compare
c470dd3
to
6ef7deb
Compare
Extracted this out of #14955
We used to rely on implied stuff here quite a bit, which breaks if we start returning non recording spans. Honestly this just surfaces that this is not really ideal as it is 😬 We already pass the client around there everywhere, so this PR updates this so we keep the active idle span as non-enumerable prop on the client, ensuring this is consistent and "pure".