ref(tracing): Set default sampling context data where startTransaction is called#3210
Merged
lobsterkatie merged 4 commits intomasterfrom Jan 29, 2021
Merged
Conversation
…de package, rename
Contributor
size-limit report
|
kamilogorek
approved these changes
Jan 29, 2021
Contributor
kamilogorek
left a comment
There was a problem hiding this comment.
Looks good, although this startIdleTransaction signature hurts me inside a little.
| const idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true); | ||
| const { location } = getGlobalObject() as WindowOrWorkerGlobalScope & { location: Location }; | ||
|
|
||
| const idleTransaction = startIdleTransaction( |
Member
Author
There was a problem hiding this comment.
You're not wrong. It's one of my goals for v7 to make the entire IdleTransaction business a lot simpler.
This was referenced Jan 29, 2021
This was referenced Mar 7, 2021
This was referenced Mar 14, 2021
Closed
Closed
Closed
Closed
Closed
Closed
Merged
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.
Currently, all default sampling context data, including platform-specific data, is gathered by the tracing package. This requires the use of node-specific and browser-specific stuff in a package meant for both, which has lead to (and continues to lead to) problems.
This PR takes advantage of the ability to pass custom sampling context in order to provide that default data* directly from the source, obviating the need to mix platforms in a problematic way. Specifically, among other things, it removes the use of
dynamicRequire,which was crashing in some cases.* request data in the case of node and location data in the case of browser
Fixes #2971.
Fixes #3060.
Fixes #3171.
Fixes #3172.