Skip to content

test(e2e): Migrate nuxt-4 to span streaming - #23949

Merged
s1gr1d merged 5 commits into
developfrom
sig/e2e-tests-nuxt-4
Sep 3, 2026
Merged

test(e2e): Migrate nuxt-4 to span streaming#23949
s1gr1d merged 5 commits into
developfrom
sig/e2e-tests-nuxt-4

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 2, 2026

Copy link
Copy Markdown
Member

Reference #23804

Two changes beyond the mechanical port. The SWR cached-html tests asserted that a second request sends no server root span — that only passed because the listener registered after page.goto, so the (always sent) second transaction arrived unobserved. Streaming's buffered flush exposed it. The tests now check the actual SWR contract: no tracing meta tags, and each pageload starts its own trace. Also, db-test.ts runs a successful query before the failing one, so the error carries a query breadcrumb — there is no transaction event to read breadcrumbs off anymore (nuxt-3 has the same setup).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread dev-packages/e2e-tests/test-applications/nuxt-4/tests/tracing.server.test.ts Dismissed
Comment thread dev-packages/e2e-tests/test-applications/nuxt-4/tests/tracing.server.test.ts Dismissed
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.71 kB - -
@sentry/browser - with treeshaking flags 27.02 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.92 kB - -
@sentry/browser (incl. Tracing) 49.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.01 kB - -
@sentry/browser (incl. Tracing, Replay) 88.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.88 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.26 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.21 kB - -
@sentry/browser (incl. Feedback) 46.2 kB - -
@sentry/browser (incl. sendFeedback) 33.78 kB - -
@sentry/browser (incl. FeedbackAsync) 38.87 kB - -
@sentry/browser (incl. Metrics) 29.68 kB - -
@sentry/browser (incl. Logs) 29.97 kB - -
@sentry/browser (incl. Metrics & Logs) 30.61 kB - -
@sentry/react 30.47 kB - -
@sentry/react (incl. Tracing) 51.3 kB - -
@sentry/vue 35.95 kB - -
@sentry/vue (incl. Tracing) 51.37 kB - -
@sentry/svelte 28.74 kB - -
CDN Bundle 30.45 kB - -
CDN Bundle (incl. Tracing) 49.64 kB - -
CDN Bundle (incl. Logs, Metrics) 32.69 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.56 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.28 kB - -
CDN Bundle (incl. Tracing, Replay) 87.13 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.01 kB - -
CDN Bundle - uncompressed 90.19 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.87 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.65 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.75 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.37 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.13 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.07 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.82 kB - -
@sentry/nextjs (client) 53.92 kB - -
@sentry/sveltekit (client) 49.53 kB - -
@sentry/core/server 40.96 kB - -
@sentry/core/browser 13.53 kB - -
@sentry/node 124.66 kB +0.02% +21 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB - -
@sentry/node - without tracing 88.5 kB +0.03% +23 B 🔺
@sentry/node - without channel injection 103.95 kB +0.03% +23 B 🔺
@sentry/aws-serverless 96.87 kB +0.03% +23 B 🔺
@sentry/cloudflare (withSentry) - minified 201.56 kB - -
@sentry/cloudflare (withSentry) 501.37 kB - -

View base workflow run

s1gr1d and others added 4 commits September 2, 2026 16:39
Storage span names are `cache.{operation}` under span streaming since #23830.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d marked this pull request as ready for review September 3, 2026 09:38
@chargome
chargome self-requested a review September 3, 2026 12:16
const rootSpan = spans.find(span => span.is_segment && span.attributes['url.path']?.value === '/api/cache-test');

return spans.filter(
span => span.trace_id === rootSpan?.trace_id && span.attributes['sentry.origin']?.value === 'auto.cache.nuxt',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the other or, this should happen automatically in collectStreamedSpans

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will apply this in another PR to not re-run CI here

expect(clientTxnEvent.contexts?.trace?.trace_id).toBe(ssrTxnEvent.contexts?.trace?.trace_id);
expect(clientTxnEvent.contexts?.trace?.trace_id).toBe(serverReqTxnEvent.contexts?.trace?.trace_id);
// All 3 root spans and the http.client span should share the same trace_id
expect(pageloadSpan?.trace_id).toBeDefined();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, the helper should already handle this, but not blocking imo

@s1gr1d
s1gr1d merged commit 374b46f into develop Sep 3, 2026
296 checks passed
@s1gr1d
s1gr1d deleted the sig/e2e-tests-nuxt-4 branch September 3, 2026 12:26
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