Skip to content

test(e2e): Move collectSpanNamesUntilSegment into @sentry-internal/test-utils - #24073

Merged
chargome merged 1 commit into
developfrom
move-collect-span-names-h
Sep 4, 2026
Merged

test(e2e): Move collectSpanNamesUntilSegment into @sentry-internal/test-utils#24073
chargome merged 1 commit into
developfrom
move-collect-span-names-h

Conversation

@chargome

@chargome chargome commented Sep 4, 2026

Copy link
Copy Markdown
Member

Adds collectStreamedSpansUntilSegment and collectSpanNamesUntilSegment to @sentry-internal/test-utils. Both wait until the segment span of a trace has arrived, matched by name or by a custom check.

The e2e tests inlined this check in ~70 places and copied the names helper into five Next.js apps. Those now use the shared helpers. Calls that also wait for specific child spans keep using collectStreamedSpans. No behavior change.

Fixes #23944

@chargome chargome self-assigned this Sep 4, 2026
@chargome

chargome commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 19e657c. Configure here.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.69 kB - -
@sentry/browser - with treeshaking flags 26.99 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.89 kB - -
@sentry/browser (incl. Tracing) 49.07 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.07 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.98 kB - -
@sentry/browser (incl. Tracing, Replay) 88.62 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.85 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.3 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.24 kB - -
@sentry/browser (incl. Feedback) 46.17 kB - -
@sentry/browser (incl. sendFeedback) 33.75 kB - -
@sentry/browser (incl. FeedbackAsync) 38.85 kB - -
@sentry/browser (incl. Metrics) 29.66 kB - -
@sentry/browser (incl. Logs) 29.94 kB - -
@sentry/browser (incl. Metrics & Logs) 30.59 kB - -
@sentry/react 30.45 kB - -
@sentry/react (incl. Tracing) 51.28 kB - -
@sentry/vue 35.91 kB - -
@sentry/vue (incl. Tracing) 51.34 kB - -
@sentry/svelte 28.71 kB - -
CDN Bundle 30.43 kB - -
CDN Bundle (incl. Tracing) 49.6 kB - -
CDN Bundle (incl. Logs, Metrics) 32.66 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.53 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.31 kB - -
CDN Bundle (incl. Tracing, Replay) 87.15 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.02 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.03 kB - -
CDN Bundle - uncompressed 90.13 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.81 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.52 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.59 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.82 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.44 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.15 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.9 kB - -
@sentry/nextjs (client) 53.89 kB - -
@sentry/sveltekit (client) 49.51 kB - -
@sentry/core/server 40.96 kB - -
@sentry/core/browser 13.53 kB - -
@sentry/node 124.76 kB +0.02% +19 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB - -
@sentry/node - without tracing 88.5 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 104.08 kB +0.02% +17 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

…/test-utils`

Add collectStreamedSpansUntilSegment and collectSpanNamesUntilSegment to the shared
test-utils and replace the inlined "collect until the segment span arrived" check
across the e2e suites. The names helper was copied into five Next.js apps and the
same check was inlined in ~70 more places. Calls that also wait for specific child
spans keep using collectStreamedSpans. No behavior change.

Fixes #23944
Refs JS-3537
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chargome
chargome force-pushed the move-collect-span-names-h branch from 19e657c to e71e0b6 Compare September 4, 2026 11:04
@chargome
chargome marked this pull request as ready for review September 4, 2026 11:38
@chargome
chargome merged commit 14fc45e into develop Sep 4, 2026
266 checks passed
@chargome
chargome deleted the move-collect-span-names-h branch September 4, 2026 11:48
andreiborza added a commit that referenced this pull request Sep 4, 2026
…-app-v2 db specs (#24092)

## What

Switches the two `create-remix-app-v2` db specs to the shared
`collectStreamedSpansUntilSegment` helper from #24073. The explicit
child-span count was redundant: the segment span ends last, so its
children are already in hand once it arrives.

## Why

Follow-up to #24058, which landed before the helper existed.

Ref: #23807
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.

Move collectSpanNamesUntilSegment helper into @sentry-internal/test-utils

2 participants