You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port these E2E test applications to span streaming (12 apps). These are the full Next.js suites: server components, route handlers, middleware and the runtime variants, plus the smaller feature fixtures.
contexts.trace.op becomes getSpanOp(span) plus span.is_segment
contexts.trace.data['x'] becomes span.attributes['x'], which has the shape { value, type }
transaction_info.source becomes the sentry.segment.name.source attribute
Streamed child spans arrive across several envelopes, so use collectStreamedSpans wherever a test asserts on children of a segment span. These suites assert heavily on server component and route handler children, so this is the bulk of the work.
Client pageload and navigation names carry over when Next resolves the route from its manifest. A pageload on a route the manifest does not know falls back to Pageload, and server-side http.server names go low cardinality.
Reference app: nextjs-16-streaming, which already covers the parameterized case, the fallback case, route handlers and server components.
Keep static trace lifecycle coverage
Before porting this group, duplicate nextjs-16 as-is into nextjs-16-static and leave that copy on the current transaction-based specs. That keeps the static trace lifecycle covered once the rest of the group moves to streaming.
The copy is verbatim; only the app name changes:
package.json -> name
start-event-proxy.mjs -> proxyServerName
every waitForTransaction / waitForError / waitForSession call in tests/
Keep traceLifecycle: 'static' in the copy's Sentry.init calls. The e2e matrix discovers apps by directory, so no CI config change is needed.
nextjs-16 is the largest app in the group at 26 test files, so nextjs-app-dir is a cheaper representative if the copy turns out to be too heavy for CI.
Port these E2E test applications to span streaming (12 apps). These are the full Next.js suites: server components, route handlers, middleware and the runtime variants, plus the smaller feature fixtures.
Out of scope, for the record:
nextjs-15-basepath,nextjs-15-intl,nextjs-16-trailing-slashare the client routing slice, done in test(e2e): Port Next.js routing test apps to span streaming #23797nextjs-16-streamingandnextjs-16-streaming-cacheComponentswere always streamingsupabase-nextjsis already ported and usescollectStreamedSpanstodaynextjs-sourcemapshas no tests,nextjs-otlpis errors-onlyApps
waitForTransactioncall sitesRoughly 6,800 lines of specs and 253
waitForTransactioncall sites, so this is worth splitting across several PRs rather than one.What to do
For each app:
traceLifecycle: 'static'pin added in test(e2e): Disable span streaming in e2e test applications #22590 from everySentry.init(client, server, edge).waitForTransactionbecomeswaitForStreamedSpan/waitForStreamedSpansevent.transactionbecomesspan.namecontexts.trace.opbecomesgetSpanOp(span)plusspan.is_segmentcontexts.trace.data['x']becomesspan.attributes['x'], which has the shape{ value, type }transaction_info.sourcebecomes thesentry.segment.name.sourceattributecollectStreamedSpanswherever a test asserts on children of a segment span. These suites assert heavily on server component and route handler children, so this is the bulk of the work.Client pageload and navigation names carry over when Next resolves the route from its manifest. A pageload on a route the manifest does not know falls back to
Pageload, and server-sidehttp.servernames go low cardinality.Reference app:
nextjs-16-streaming, which already covers the parameterized case, the fallback case, route handlers and server components.Keep static trace lifecycle coverage
Before porting this group, duplicate
nextjs-16as-is intonextjs-16-staticand leave that copy on the current transaction-based specs. That keeps the static trace lifecycle covered once the rest of the group moves to streaming.The copy is verbatim; only the app name changes:
package.json->namestart-event-proxy.mjs->proxyServerNamewaitForTransaction/waitForError/waitForSessioncall intests/Keep
traceLifecycle: 'static'in the copy'sSentry.initcalls. The e2e matrix discovers apps by directory, so no CI config change is needed.nextjs-16is the largest app in the group at 26 test files, sonextjs-app-diris a cheaper representative if the copy turns out to be too heavy for CI.