Skip to content

test(nextjs): Cover the server request link of a late trace meta tag - #26357

Merged
s1gr1d merged 1 commit into
developfrom
test/nextjs-late-trace-meta-tag-link
Nov 13, 2026
Merged

s1gr1d merged 1 commit into
developfrom
test/nextjs-late-trace-meta-tag-link

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 13, 2026

Copy link
Copy Markdown
Member

What

Adds an E2E test to both Cache Components apps for a trace meta tag that streams in after the pageload stopped waiting for it. The test checks that the pageload keeps its own trace and links the server request with a server_request link.

Why

Until now, only unit tests with fake timers and a hand-written meta tag covered this case. This test runs it against a real streamed response from a production build. The page waits 10.5 seconds: longer than the pageload's 10-second wait, but short enough that the tag arrives before the pageload ends.

The pageload waits at most 10 seconds for the trace meta tag of a resumed
shell. When the tag arrives later, the pageload links the server request
instead of continuing its trace. Unit tests cover this with fake timers. This
adds an E2E test that streams the tag after 10.5 seconds in a real build.
@s1gr1d
s1gr1d marked this pull request as ready for review November 13, 2026 14:09
@s1gr1d
s1gr1d requested a review from a team November 13, 2026 14:09
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 1ee3461 (PR test merge using develop at 9279303)

Against: 9279303 (develop) · base run #66015

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.1 kB - -
@sentry/browser - with treeshaking flags 28.3 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.2 kB - -
@sentry/browser (incl. Tracing) 52.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.25 kB - -
@sentry/browser (incl. Tracing, Replay) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.6 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.6 kB - -
@sentry/browser (incl. Feedback) 47.73 kB - -
@sentry/browser (incl. sendFeedback) 30.69 kB - -
@sentry/browser (incl. FeedbackAsync) 35.69 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.71 kB - -
@sentry/browser (incl. Metrics & Logs) 32.37 kB - -
@sentry/react 32.11 kB - -
@sentry/react (incl. Tracing) 54.95 kB - -
@sentry/vue 38.3 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 30.12 kB - -
@sentry/remix (Remix 3 client bundle) 58.06 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 52.7 kB - -
CDN Bundle (incl. Logs, Metrics) 34.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.09 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.69 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.45 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.43 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.6 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.01 kB - -
@sentry/nextjs (client) 58.34 kB - -
@sentry/sveltekit (client) 53.46 kB - -
@sentry/core/server 44.57 kB - -
@sentry/core/browser 13.99 kB - -
@sentry/node 149.54 kB -0.01% -3 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.3 kB - -
@sentry/node - without tracing 88.47 kB -0.01% -8 B 🔽
@sentry/node - without channel injection 138.5 kB -0.01% -3 B 🔽
@sentry/aws-serverless 97.39 kB -0.01% -7 B 🔽
@sentry/cloudflare (withSentry) - minified 204.55 kB - -
@sentry/cloudflare (withSentry) 474.76 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 229.86 kB - -

View base workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 11m Details

@s1gr1d
s1gr1d merged commit f94f11e into develop Nov 13, 2026
55 of 56 checks passed
@s1gr1d
s1gr1d deleted the test/nextjs-late-trace-meta-tag-link branch November 13, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants