fix(nextjs): Use domains to prevent scope bleed#3788
Merged
lobsterkatie merged 2 commits intomasterfrom Jul 14, 2021
Merged
Conversation
35fa46c to
3491bfe
Compare
Contributor
size-limit report
|
Contributor
|
Tbh I'm not sure if |
Contributor
|
We should think about using async_hooks instead of domains for the next sdk. We can also do it in another PR. |
37e446c to
d8cf291
Compare
kamilogorek
approved these changes
Jul 13, 2021
Contributor
kamilogorek
left a comment
There was a problem hiding this comment.
Although I agree with @AbhiPrasad that it might be a good playground for async_hooks
11df2e6 to
d8cf291
Compare
AbhiPrasad
approved these changes
Jul 14, 2021
masonmcelvain
added a commit
to iFixit/react-commerce
that referenced
this pull request
Aug 9, 2022
We were clearing the scope because we were worried that different requests might pollute each other's scopes on the server. Howevever, it looks like Sentry handles this for us, so we don't need to risk blowing away valuable debugging info: getsentry/sentry-javascript#3788
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.
This PR uses domains to keep scope data attached to simultaneous requests from bleeding between those requests. (For example, when testing tracing on API routes deployed to Vercel, in certain cases all transactions were using the same
traceId, even though the original transaction corresponding to that id had long since finished.)