Repository navigation
Conversation
|
bugbot run |
size-limit report 📦Compared: fc3667f (PR test merge using chargome/ref/remix-core-server-timing-utils at abd84dd) Against: f49009b (chargome/ref/remix-core-server-timing-utils) · base run #65866
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 10 successful. See the run.
Successful checks
|
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
2091a1e to
5ad59f6
Compare
|
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 5ad59f6. Configure here.
…responses Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
5ad59f6 to
ef9e5f1
Compare
Under
cacheComponentsthesentry-tracemeta tag arrives with the resumed part of the document, usually after the browser SDK started, so the pageload has to wait for it (#25142). AServer-Timingheader reaches the browser before any HTML. The browser SDK already reads it, and Remix and Nitro already send it. On a self-hosted server Next.js flushes the headers with the first chunk, inside the request span, so the header is set inwriteHeadrather than when the request comes in.Before, with the meta tag only:
sequenceDiagram participant B as Browser participant S as Next.js server B->>S: GET /page Note over S: request span starts, shell comes from cache S-->>B: headers + shell (no trace context) Note over B: SDK starts, pageload has to wait Note over S: dynamic part renders S-->>B: resumed part with sentry-trace meta tag Note over B: pageload starts late, fetches and errors before it are unattachedAfter, with the header:
sequenceDiagram participant B as Browser participant S as Next.js server B->>S: GET /page Note over S: request span starts, shell comes from cache Note over S: writeHead on the first chunk: Server-Timing carries the active trace S-->>B: headers + shell (Server-Timing: sentry-trace, baggage) Note over B: SDK starts, pageload continues the trace at once Note over S: dynamic part renders S-->>B: resumed part with sentry-trace meta tag Note over B: tag only settles page.server_rendering.typeThe header is left off responses a shared cache may store, which is what Next.js sends for static and ISR app router documents. A CDN in front of the server would otherwise replay one visitor's trace and sampling decision to everyone. Non-document responses get no header either.
Since the pageload no longer waits for the tag,
page.server_rendering.typeis settled after span start for a runtime shell with a dynamic part, sotracesSamplerdoes not see it in that case.Closes #24945
Refs JS-3864