Skip to content

test(e2e): Port the nestjs-12 E2E app to span streaming - #24098

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

test(e2e): Port the nestjs-12 E2E app to span streaming#24098
chargome merged 5 commits into
developfrom
cg/e2e-nestjs-12-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.

Ref: #23801

🤖 Generated with Claude Code

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

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 - -
@sentry/browser - with treeshaking flags 27.11 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27 kB - -
@sentry/browser (incl. Tracing) 49.22 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.12 kB - -
@sentry/browser (incl. Tracing, Replay) 88.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.95 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.37 kB - -
@sentry/browser (incl. Feedback) 46.3 kB - -
@sentry/browser (incl. sendFeedback) 33.86 kB - -
@sentry/browser (incl. FeedbackAsync) 38.97 kB - -
@sentry/browser (incl. Metrics) 29.82 kB - -
@sentry/browser (incl. Logs) 30.09 kB - -
@sentry/browser (incl. Metrics & Logs) 30.75 kB - -
@sentry/react 30.55 kB - -
@sentry/react (incl. Tracing) 51.56 kB - -
@sentry/vue 36.05 kB - -
@sentry/vue (incl. Tracing) 51.48 kB - -
@sentry/svelte 28.83 kB - -
CDN Bundle 30.55 kB - -
CDN Bundle (incl. Tracing) 49.74 kB - -
CDN Bundle (incl. Logs, Metrics) 32.82 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.29 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.21 kB - -
CDN Bundle - uncompressed 90.46 kB - -
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.03 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.14 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.29 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.65 kB - -
@sentry/core/server 36.99 kB - -
@sentry/core/browser 13.55 kB - -
@sentry/node 127.73 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% +21 B 🔺
@sentry/node - without channel injection 106.98 kB +0.02% +21 B 🔺
@sentry/aws-serverless 97.12 kB +0.03% +26 B 🔺
@sentry/cloudflare (withSentry) - minified 201.95 kB - -
@sentry/cloudflare (withSentry) 502.67 kB - -

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 3dc1fa3. Configure here.

@chargome
chargome marked this pull request as ready for review September 7, 2026 09:35
const spans = await spansPromise;
const segmentSpan = spans.find(span => span.is_segment)!;

expect(segmentSpan).toMatchObject({

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.

did you switch to toMatchObject from toEqual on purpose? might be better sticking to toEqual to be more exhaustive and not accidentally loose any relevant assertions?

Switches the span assertions from `toMatchObject` to `toEqual` so an unexpected
field or attribute fails the test, as the transaction-based specs did.

Child spans carry a bounded attribute set, so they are matched exhaustively. The
segment span also carries the scope contexts, SDK integrations and user IP, which
vary by machine, so it keeps `objectContaining`.

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

@nicohrubec nicohrubec left a comment

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.

nice

chargome and others added 2 commits September 8, 2026 11:22
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>
…ceptor requests

The file asserts on streamed spans, not transaction events. Both specs of each
interceptor route also produced a trace with the same segment name, so each request
now carries a `spec` query marker to tell its own trace apart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome
chargome merged commit f100c7c into develop Sep 8, 2026
310 of 311 checks passed
@chargome
chargome deleted the cg/e2e-nestjs-12-streaming branch September 8, 2026 11:32
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