Title: Port the main Next.js E2E test suites to span streaming · Issue #23802 · getsentry/sentry-javascript · GitHub
Open Graph Title: Port the main Next.js E2E test suites to span streaming · Issue #23802 · getsentry/sentry-javascript
X Title: Port the main Next.js E2E test suites to span streaming · Issue #23802 · getsentry/sentry-javascript
Description: 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: nex...
Open Graph Description: 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 fix...
X Description: 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 fix...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23802
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Port the main Next.js E2E test suites to span streaming","articleBody":"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.\n\nOut of scope, for the record:\n\n* `nextjs-15-basepath`, `nextjs-15-intl`, `nextjs-16-trailing-slash` are the client routing slice, done in getsentry/sentry-javascript#23797\n* `nextjs-16-streaming` and `nextjs-16-streaming-cacheComponents` were always streaming\n* `supabase-nextjs` is already ported and uses `collectStreamedSpans` today\n* `nextjs-sourcemaps` has no tests, `nextjs-otlp` is errors-only\n\n## Apps\n\n\u003c!-- linear:table-colwidths:200,200,200 -->\n| App | Test files | `waitForTransaction` call sites |\n| -- | -- | -- |\n| nextjs-16 | 26 | 48 |\n| nextjs-15 | 18 | 47 |\n| nextjs-16-cf-workers | 14 | 33 |\n| nextjs-app-dir | 10 | 39 |\n| nextjs-pages-dir | 10 | 20 |\n| nextjs-16-bun | 9 | 25 |\n| nextjs-14 | 4 | 21 |\n| nextjs-16-cacheComponents | 2 | 9 |\n| nextjs-orpc | 2 | 5 |\n| nextjs-15-t3 | 2 | 4 |\n| nextjs-16-tunnel | 1 | 6 |\n| nextjs-16-userfeedback | 1 | 0 |\n\nRoughly 6,800 lines of specs and 253 `waitForTransaction` call sites, so this is worth splitting across several PRs rather than one.\n\n## What to do\n\nFor each app:\n\n1. Remove the `traceLifecycle: 'static'` pin added in getsentry/sentry-javascript#22590 from every `Sentry.init` (client, server, edge).\n2. Rewrite the specs from transaction envelopes to span v2:\n * `waitForTransaction` becomes `waitForStreamedSpan` / `waitForStreamedSpans`\n * `event.transaction` becomes `span.name`\n * `contexts.trace.op` becomes `getSpanOp(span)` plus `span.is_segment`\n * `contexts.trace.data['x']` becomes `span.attributes['x']`, which has the shape `{ value, type }`\n * `transaction_info.source` becomes the `sentry.segment.name.source` attribute\n3. 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.\n\nClient 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.\n\nReference app: `nextjs-16-streaming`, which already covers the parameterized case, the fallback case, route handlers and server components.\n\n## Keep static trace lifecycle coverage\n\nBefore 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.\n\nThe copy is verbatim; only the app name changes:\n\n* `package.json` -> `name`\n* `start-event-proxy.mjs` -> `proxyServerName`\n* every `waitForTransaction` / `waitForError` / `waitForSession` call in `tests/`\n\nKeep `traceLifecycle: 'static'` in the copy's `Sentry.init` calls. The e2e matrix discovers apps by directory, so no CI config change is needed.\n\n`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.","author":{"url":"https://github.com/andreiborza","@type":"Person","name":"andreiborza"},"datePublished":"2026-09-01T09:02:33Z","url":"https://github.com/getsentry/sentry-javascript/issues/23802"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:36cfad36-7902-de9c-5a1c-5f5a68a36749 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE4C:125D11:11303D:16FE81:6B042DCA |
| html-safe-nonce | 94222e0c26b3ce58cbbd8675aaa17eec6d6fd5e8389a72f9012ed32cedbcddc0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTRDOjEyNUQxMToxMTMwM0Q6MTZGRTgxOjZCMDQyRENBIiwidmlzaXRvcl9pZCI6IjQ5NjYyMDQxMjcwNTIwNDk4NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b64114b132c97b25250b22f313ba3d768924be36a4054e3595e8d47db468dc0f |
| hovercard-subject-tag | issue:5309925644 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/23802/issue_layout |
| twitter:image | https://opengraph.githubassets.com/421c8e71663961e3643f2ab66788cc9f645d6246a50bca012452ed8e45b13720/getsentry/sentry-javascript/issues/23802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/421c8e71663961e3643f2ab66788cc9f645d6246a50bca012452ed8e45b13720/getsentry/sentry-javascript/issues/23802 |
| og:image:alt | 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 fix... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andreiborza |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width