Skip to content

test(e2e): Migrate nitro-3 to span streaming - #23946

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

s1gr1d merged 5 commits into
developfrom
sig/e2e-tests-nitro-3

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 2, 2026

Copy link
Copy Markdown
Member

Reference #23804

Two things had to change beyond the mechanical port. The tests assumed the srvx request span is the segment (root) span of a request. At runtime the segment comes from the node http_server integration, and the srvx span nests below it — so the origin and parent assertions now reflect that. The isolation test also read scope tags off the transaction event; streamed spans do not carry scope tags, so request isolation is now asserted via the error event's tags only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.81 kB - -
@sentry/browser - with treeshaking flags 27.12 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.01 kB - -
@sentry/browser (incl. Tracing) 49.22 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.15 kB - -
@sentry/browser (incl. Tracing, Replay) 88.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.94 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.38 kB - -
@sentry/browser (incl. Feedback) 46.3 kB - -
@sentry/browser (incl. sendFeedback) 33.87 kB - -
@sentry/browser (incl. FeedbackAsync) 38.99 kB - -
@sentry/browser (incl. Metrics) 29.84 kB - -
@sentry/browser (incl. Logs) 30.1 kB - -
@sentry/browser (incl. Metrics & Logs) 30.78 kB - -
@sentry/react 30.57 kB - -
@sentry/react (incl. Tracing) 51.57 kB - -
@sentry/vue 36.07 kB - -
@sentry/vue (incl. Tracing) 51.49 kB - -
@sentry/svelte 28.85 kB - -
CDN Bundle 30.56 kB - -
CDN Bundle (incl. Tracing) 49.76 kB - -
CDN Bundle (incl. Logs, Metrics) 32.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB - -
CDN Bundle (incl. Tracing, Replay) 87.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.2 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.22 kB - -
CDN Bundle - uncompressed 90.47 kB - -
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.04 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.13 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.3 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.76 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.4 kB - -
@sentry/nextjs (client) 54.03 kB - -
@sentry/sveltekit (client) 49.68 kB - -
@sentry/core/server 36.99 kB - -
@sentry/core/browser 13.55 kB - -
@sentry/node 127.86 kB +0.02% +20 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.61 kB - -
@sentry/node - without tracing 88.73 kB +0.03% +24 B 🔺
@sentry/node - without channel injection 107.11 kB +0.03% +24 B 🔺
@sentry/aws-serverless 97.12 kB +0.03% +28 B 🔺
@sentry/cloudflare (withSentry) - minified 201.98 kB - -
@sentry/cloudflare (withSentry) 502.68 kB - -

View base workflow run

@s1gr1d
s1gr1d marked this pull request as ready for review September 2, 2026 14:28
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 draft September 2, 2026 14:48
@s1gr1d
s1gr1d marked this pull request as ready for review September 8, 2026 08:43
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

👋 @logaretm, @andreiborza — Please review this PR when you get a chance!

Comment on lines +11 to +18
const spans = await collectStreamedSpans('nitro-3', spans =>
spans.some(span => span.is_segment && span.attributes['url.path']?.value === '/api/test-cache'),
);
const segmentSpan = spans.find(span => span.is_segment && span.attributes['url.path']?.value === '/api/test-cache');

return spans.filter(
span => span.trace_id === segmentSpan?.trace_id && span.attributes['sentry.origin']?.value === 'auto.cache.nitro',
);

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.

l: You can use this helper instead:

const spans = await collectStreamedSpansUntilSegment(
  'nitro-3',
  span => span.attributes['url.path']?.value === '/api/test-cache',
);

return spans.filter(span => span.attributes['sentry.origin']?.value === 'auto.cache.nitro');

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.

ah thanks! that did not exists at the time of the PR :D

Comment on lines +7 to +11
const spans = await collectStreamedSpans('nitro-3', spans =>
spans.some(span => span.is_segment && span.name === 'GET /api/test-nesting'),
);
const segmentSpan = spans.find(span => span.is_segment && span.name === 'GET /api/test-nesting');
return spans.filter(span => span.trace_id === segmentSpan?.trace_id);

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.

l: and here too

Comment on lines +7 to +14
const spans = await collectStreamedSpans('nitro-3', spans =>
spans.some(span => span.is_segment && span.attributes['url.path']?.value === route),
);
const segmentSpan = spans.find(span => span.is_segment && span.attributes['url.path']?.value === route);

return spans.filter(
span => span.trace_id === segmentSpan?.trace_id && span.attributes['sentry.origin']?.value === 'auto.cache.nitro',
);

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.

l: and here.

Comment on lines +7 to +13
const spans = await collectStreamedSpans('nitro-3', spans =>
spans.some(span => span.is_segment && span.attributes['url.path']?.value === route),
);
const segmentSpan = spans.find(span => span.is_segment && span.attributes['url.path']?.value === route);

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

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.

l: and here

s1gr1d and others added 2 commits September 9, 2026 10:02
Replace the hand-rolled accumulate-until-segment logic with the shared
test-utils helper, as suggested in review. The helper already scopes the
result to the matched trace, so the per-trace filtering falls away.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d enabled auto-merge September 9, 2026 08:13
@s1gr1d
s1gr1d merged commit 3a9c24d into develop Sep 9, 2026
42 checks passed
@s1gr1d
s1gr1d deleted the sig/e2e-tests-nitro-3 branch September 9, 2026 08:18
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