ref(browser): Improve active span handling for browserTracingIntegration#14959
Merged
ref(browser): Improve active span handling for browserTracingIntegration#14959
browserTracingIntegration#14959Conversation
6b99199 to
7547547
Compare
Contributor
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 |
Lms24
reviewed
Jan 9, 2025
|
|
||
| const activeSpan = getActiveSpan(); | ||
| const rootSpan = activeSpan && getRootSpan(activeSpan); | ||
| const rootSpan = getActiveIdleSpan(client); |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
so I adjusted the idle spans to be unset when the idle (route) span ends. Then, I think this should be OK?
Lms24
reviewed
Jan 9, 2025
3720405 to
c470dd3
Compare
c470dd3 to
6ef7deb
Compare
Lms24
approved these changes
Jan 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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".