Skip to content

test(e2e): Port the nestjs-basic E2E app to span streaming - #24099

Merged
chargome merged 5 commits into
developfrom
cg/e2e-nestjs-basic-streaming
Sep 8, 2026
Merged

test(e2e): Port the nestjs-basic E2E app to span streaming#24099
chargome merged 5 commits into
developfrom
cg/e2e-nestjs-basic-streaming

Conversation

@chargome

@chargome chargome commented Sep 4, 2026

Copy link
Copy Markdown
Member

Removes the traceLifecycle: 'static' pin and rewrites the specs against streamed spans.

Two things did not port mechanically. waitForStreamedSpan gains the optional timestamp parameter waitForEnvelopeItem already has, because the app_creation span is emitted at startup, before any spec can start listening. And streamed spans carry no breadcrumbs, so /test-schedule-isolation reports whether a scheduled task's breadcrumb leaked into its isolation scope as a span attribute, the same way the Next.js middleware specs do.

Ref: #23801

🤖 Generated with Claude Code

Removes the `traceLifecycle: 'static'` pin and rewrites the specs against streamed spans.

Two things did not port mechanically. `waitForStreamedSpan` gains the optional `timestamp` parameter `waitForEnvelopeItem` already has, because the `app_creation` span is emitted at startup, before any spec can start listening. And streamed spans carry no breadcrumbs, so `/test-schedule-isolation` reports whether a scheduled task's breadcrumb leaked into its isolation scope as a span attribute, the same way the Next.js middleware specs do.

Ref: #23801

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome chargome self-assigned this Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.8 kB added added
@sentry/browser - with treeshaking flags 27.11 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 27 kB added added
@sentry/browser (incl. Tracing) 49.22 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB added added
@sentry/browser (incl. Tracing, Profiling) 52.12 kB added added
@sentry/browser (incl. Tracing, Replay) 88.76 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.95 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 106.37 kB added added
@sentry/browser (incl. Feedback) 46.3 kB added added
@sentry/browser (incl. sendFeedback) 33.86 kB added added
@sentry/browser (incl. FeedbackAsync) 38.97 kB added added
@sentry/browser (incl. Metrics) 29.82 kB added added
@sentry/browser (incl. Logs) 30.09 kB added added
@sentry/browser (incl. Metrics & Logs) 30.75 kB added added
@sentry/react 30.55 kB added added
@sentry/react (incl. Tracing) 51.56 kB added added
@sentry/vue 36.05 kB added added
@sentry/vue (incl. Tracing) 51.48 kB added added
@sentry/svelte 28.83 kB added added
CDN Bundle 30.55 kB added added
CDN Bundle (incl. Tracing) 49.74 kB added added
CDN Bundle (incl. Logs, Metrics) 32.82 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB added added
CDN Bundle (incl. Tracing, Replay) 87.29 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.18 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 93.22 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.21 kB added added
CDN Bundle - uncompressed 90.46 kB added added
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.03 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.14 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.29 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.76 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.71 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.46 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.4 kB added added
@sentry/nextjs (client) 54.03 kB added added
@sentry/sveltekit (client) 49.65 kB added added
@sentry/core/server 36.99 kB added added
@sentry/core/browser 13.55 kB added added
@sentry/node 127.73 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.61 kB added added
@sentry/node - without tracing 88.73 kB added added
@sentry/node - without channel injection 106.98 kB added added
@sentry/aws-serverless 97.12 kB added added
@sentry/cloudflare (withSentry) - minified 201.95 kB added added
@sentry/cloudflare (withSentry) 502.67 kB added added

View base workflow run

@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.

Stale Bugbot comment from a previous run.

…wrapper

The local `waitForSegmentSpan` only re-expressed what `collectStreamedSpansUntilSegment`
and `waitForStreamedSpan` already do, and was copied into every ported app.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome

chargome commented Sep 7, 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 9296321. Configure here.

@chargome
chargome marked this pull request as ready for review September 7, 2026 09:36
chargome and others added 2 commits September 8, 2026 10:35
Switches the span assertions from `toMatchObject` to `toEqual` so an unexpected
field or attribute fails the test, as the transaction-based specs did.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI builds the apps with a release, so every span carries `sentry.release` there
and none locally, which the exhaustive attribute matching tripped over.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@@ -1,745 +1,412 @@
import { expect, test } from '@playwright/test';

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.

I guess at some point we should rename these files to spans.test.ts or trace.test.ts or similar

The file asserts on streamed spans, not transaction events, and `spans.test.ts`
is what the other streaming apps already call it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome
chargome enabled auto-merge (squash) September 8, 2026 10:00
@chargome
chargome merged commit 64fb9d1 into develop Sep 8, 2026
307 of 310 checks passed
@chargome
chargome deleted the cg/e2e-nestjs-basic-streaming branch September 8, 2026 10:20
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