ref(nextjs): Clean up browser tracing integration #11022
Merged
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.
Updates the app & pages router instrumentation to avoid depreacted options & streamline it overall.
This required a change to browser tracing, which is to allow to provide a custom
sentryTrace
/baggage
string value to continue a trace from. Before this, we always picked up the trace frommeta
tag, which meant that if we tried to continue a trace manually in nextjs, then called the default browser tracing integration, it would just overwrite it.Now, you can optionally pass this like this:
And this will take presedence over looking at the meta tags! This also means we don't need any custom scope/trace handling in nextjs there anymore, which is also nice!