Repository navigation
Conversation
size-limit report 📦Compared: c3591f8 (PR test merge using base PR #27086 at 990c723) Against: 990c723 (base PR #27086) · base run #68591 ✅ Baseline matches: this diff contains only this PR's changes.
|
Runs the proxy and the render of the adapter app in processes of their own, as on Vercel, so the test covers the hand-off in the `traceparent` and `tracestate` request headers. Refs #26980 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aec1c26 to
0f32147
Compare
| function getRenderRequestHeaders(incomingHeaders, proxyResponseHeaders) { | ||
| const overrides = proxyResponseHeaders['x-middleware-override-headers']; | ||
| if (!overrides) { | ||
| return incomingHeaders; | ||
| } | ||
| const headers = {}; | ||
| for (const key of overrides.split(',').map(key => key.trim())) { | ||
| const value = proxyResponseHeaders[`x-middleware-request-${key}`]; | ||
| if (value !== undefined) { | ||
| headers[key] = value; | ||
| } | ||
| } | ||
| return headers; |
There was a problem hiding this comment.
Incoming-trace e2e expects render parent to be remote parent, not proxy span
tests/proxy-render-trace.test.ts asserts the render segment’s parent_span_id stays 1121201211212012 when an incoming sentry-trace is present. With the harness applying proxy hand-off headers (traceparent/tracestate), the render must parent to proxySegment.span_id (as the first e2e test and NextSentryPropagator unit tests require), so this assertion fails under correct hand-off behavior.
Evidence
server.mjsgetRenderRequestHeaders()rebuilds the render request fromx-middleware-request-*, which is how Next handstraceparent/tracestatefrom the proxy process to the render.NextSentryPropagator.extract()prefersextractTraceHandOff(traceparent, tracestate)over an incomingsentry-trace, and unit tests assert the render’s parent is the hand-off span id.- The first e2e case already expects
renderSegment.parent_span_id === proxySegment.span_id. - The second e2e case still expects both proxy and render segments to use parent
1121201211212012, which contradicts that hand-off contract once override headers are applied.
Identified by Warden · code-review · R5S-EED
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 64 successful. See the run.
Successful checks
|
…dapter-proxy-render-trace
What
The
nextjs-16-adaptere2e app now runs the proxy and the render in processes of their own, like Vercel,and checks that the render continues the proxy's trace, with and without an incoming trace.
Why
next startruns proxy and render in one process, so it does not cover the headers Next.js passes betweenthem when the proxy runs on its own. A real Vercel deployment would cover that too, but we keep it out of CI.
Ref: #26980