-
-
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(tracing): Set default sampling context data where startTransaction
is called
#3210
Conversation
…de package, rename
size-limit report
|
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.
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( |
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.
5 arguments 😢
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.
You're not wrong. It's one of my goals for v7 to make the entire IdleTransaction
business a lot simpler.
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.