Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Mar 11, 2024

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 from meta 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:

startBrowserTracingPageLoadSpan(
    client,
    { name },
    { sentryTrace, baggage }
});

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!

@mydea mydea requested review from lforst and s1gr1d March 11, 2024 14:19
@mydea mydea self-assigned this Mar 11, 2024
@mydea mydea force-pushed the fn/next-browserTracing branch from 931a0f0 to 24c0287 Compare March 11, 2024 15:51
@mydea mydea force-pushed the fn/next-browserTracing branch from 24c0287 to 644da33 Compare March 12, 2024 13:36
@mydea mydea merged commit 6088078 into develop Mar 12, 2024
@mydea mydea deleted the fn/next-browserTracing branch March 12, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants