Repository navigation
Conversation
…oads A mobile SDK can inject `sentry-trace` and `baggage` meta tags into the document of a WebView. The Pages Router pageload ignored them and continued the server trace. It now continues a meta tag that belongs to another trace than the server request, and keeps the previous behavior in every other case. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
size-limit report 📦Compared: 14f2a82 (PR test merge using develop at 6df7a32) Against: a12f1aa (develop) · base run #68171
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 6 not successful, 12 successful. See the run.
Successful checks
|
… meta tag tests Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
…2E tests Chrome denies a document that Playwright fulfills the requests to the event proxy on localhost, so the pageload span never arrived. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
…emporary) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…(temporary) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Another test loads the same page in a parallel worker, and its pageload span matched this test's wait. Also removes the temporary logging. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3e59e9e. Configure here.
What
A Pages Router pageload now continues
sentry-traceandbaggagemeta tags that belong to another trace than the server request, for example tags a mobile SDK injects into a WebView.Why
The pageload always continued the server trace, so a WebView could not continue the trace of the app around it.
Next.js 15 and later render the server trace into the same meta tags, so a tag only counts as injected when its trace ID differs from the server's. The server's trace ID comes from
__NEXT_DATA__, or from theServer-Timingheader for Turbopack builds, which don't wrap data fetchers. The tag also needs abaggagetag for the same trace, so the baggage of the server trace is never mixed in.Documents without such a tag behave as before. With an injected tag, the pageload follows the sampling decision of that trace and is no longer linked to the server span. On a Turbopack build whose host sends no
Server-Timingheader, there is nothing to compare against and the first tag in the document still wins.Stacked on #26924.