Uh oh!
There was an error while loading. Please reload this page.
test(e2e): Port nextjs-16 to span streaming - #23924
Merged
Merged
Conversation
Contributor
size-limit report 📦
|
chargomeforce-pushed
the
test/e2e-port-nextjs-16
branch
from
September 2, 2026 11:18
aa366e6 to
aa4c58cComparechargome
marked this pull request as ready for review
September 2, 2026 13:21
andreiborza
approved these changes
Sep 2, 2026
Comment on lines
51
to
+52
| // TODO: proxy errors currently not reported via onRequestError | ||
| // await test.step('should record exceptions', async () => { | ||
| // const errorEvent = await errorEventPromise; | ||
| // // Assert that isolation scope works properly | ||
| // expect(errorEvent.tags?.['my-isolated-tag']).toBe(true); | ||
| // expect(errorEvent.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); | ||
| // expect([ | ||
| // 'middleware GET', // non-otel webpack versions | ||
| // '/middleware', // middleware file | ||
| // '/proxy', // proxy file | ||
| // ]).toContain(errorEvent.transaction); | ||
| // }); | ||
| // await test.step('should record exceptions', async () => { ... }); |
MemberAuthor
There was a problem hiding this comment.
no this is fixed in next 16.3
Removes the `traceLifecycle: 'static'` pins and rewrites the specs onto streamed spans. Tests asserting on children of a segment span (server components, DB instrumentation, middleware fetch, prefetch) use `collectStreamedSpans` and accumulate until the segment, which ends last. The route-handler specs correlate an error or message event with its server span; those match the span on the event's own trace, so batching cannot pair spans across specs. `http.client` span names are low cardinality under streaming, so the middleware fetch span is `GET localhost` rather than `GET http://localhost:3030/` - which also mattered for the matcher, since the old name was used as a predicate and would have hung rather than failed. Dropped, having no span v2 equivalent: - The middleware isolation-scope assertions, including the guard that middleware tags do not leak onto the following route span. Span v2 carries no scope tags, so neither the tag nor its absence is observable. - The middleware `breadcrumbs` assertion. The fetch stays covered by its `http.client` span. - The `contexts.runtime.name` matchers, which only disambiguated uniquely named spans. Request headers carry over as `http.request.header.*` attributes, so the route-handler and pageload header assertions keep their coverage. Ref #23802 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chargomeforce-pushed
the
test/e2e-port-nextjs-16
branch
from
September 2, 2026 13:43
aa4c58c to
145b8d8CompareUh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports
nextjs-16to span streaming: removes thetraceLifecycle: 'static'pins and rewrites the specs onto streamed spans, usingcollectStreamedSpanswhere a test asserts on children of a segment span.Route-handler specs match the server span on the event's own trace so batching cannot pair spans across specs.
http.clientspan names are low cardinality under streaming (GET localhost), which also mattered for the old name being used as a matcher.The middleware isolation-scope and breadcrumb assertions were dropped, having no span v2 equivalent.
nextjs-16-static(#23834) keeps the transaction-based versions of these specs.Ref #23802