Skip to content

feat(nextjs): Migrate edge event processors to span-first APIs#20551

Merged
chargome merged 4 commits intodevelopfrom
cg/js-2209-event-processor-migration-nextjs-edge-event-processors
Apr 29, 2026
Merged

feat(nextjs): Migrate edge event processors to span-first APIs#20551
chargome merged 4 commits intodevelopfrom
cg/js-2209-event-processor-migration-nextjs-edge-event-processors

Conversation

@chargome
Copy link
Copy Markdown
Member

Basically #20527 but for edge

closes #20368

@chargome chargome self-assigned this Apr 28, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 28, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

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 26.16 kB - -
@sentry/browser - with treeshaking flags 24.63 kB - -
@sentry/browser (incl. Tracing) 44.11 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 46.16 kB - -
@sentry/browser (incl. Tracing, Profiling) 49.06 kB - -
@sentry/browser (incl. Tracing, Replay) 83.46 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.94 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 88.14 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 100.79 kB - -
@sentry/browser (incl. Feedback) 43.4 kB - -
@sentry/browser (incl. sendFeedback) 30.96 kB - -
@sentry/browser (incl. FeedbackAsync) 36.14 kB - -
@sentry/browser (incl. Metrics) 27.44 kB - -
@sentry/browser (incl. Logs) 27.59 kB - -
@sentry/browser (incl. Metrics & Logs) 28.28 kB - -
@sentry/react 27.9 kB - -
@sentry/react (incl. Tracing) 46.35 kB - -
@sentry/vue 31.03 kB - -
@sentry/vue (incl. Tracing) 45.95 kB - -
@sentry/svelte 26.18 kB - -
CDN Bundle 28.84 kB - -
CDN Bundle (incl. Tracing) 46.71 kB - -
CDN Bundle (incl. Logs, Metrics) 30.25 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 47.8 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 69.34 kB - -
CDN Bundle (incl. Tracing, Replay) 83.88 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 84.94 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 89.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 90.78 kB - -
CDN Bundle - uncompressed 84.55 kB - -
CDN Bundle (incl. Tracing) - uncompressed 139.68 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 88.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 143.14 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 212.71 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 257.49 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 260.93 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 271.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 274.62 kB - -
@sentry/nextjs (client) 48.84 kB - -
@sentry/sveltekit (client) 44.56 kB - -
@sentry/node-core 59 kB +0.03% +12 B 🔺
@sentry/node 170.11 kB +0.01% +9 B 🔺
@sentry/node - without tracing 97.81 kB +0.02% +11 B 🔺
@sentry/aws-serverless 114.53 kB +0.05% +48 B 🔺
@sentry/cloudflare (withSentry) - minified 164.13 kB - -
@sentry/cloudflare (withSentry) 415.2 kB - -

View base workflow run

span.name = name;
},
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feat PR missing integration or E2E test

Low Severity

This is a feat PR that migrates edge event processors to span-first APIs, including a new ignoreSpans configuration and a new processSegmentSpan hook. The diff only includes unit tests (enhanceMiddlewareRootSpan.test.ts and edgeSdk.test.ts). Per the project review rules, feat PRs need at least one integration or E2E test to verify the end-to-end behavior of the new span-first flow, especially for the streamed-span path which is entirely new functionality.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 04e5262. Configure here.

@chargome chargome requested a review from nicohrubec April 28, 2026 12:28
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7334e14. Configure here.


expect(getName()).toBe('middleware CONNECT /foo');
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing integration or E2E test for feat PR

Low Severity

This feat PR only includes unit tests (enhanceMiddlewareRootSpan.test.ts and edgeSdk.test.ts) but no integration or E2E test. Per project rules, feat PRs are expected to include at least one integration or E2E test. While this is largely a migration of existing behavior, an integration test verifying the end-to-end middleware span name normalization on the edge runtime (covering both legacy and streamed paths) would help catch regressions.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 7334e14. Configure here.

Comment thread packages/nextjs/src/edge/index.ts Outdated
Comment thread packages/nextjs/src/edge/index.ts
@chargome chargome merged commit d9a94ba into develop Apr 29, 2026
255 checks passed
@chargome chargome deleted the cg/js-2209-event-processor-migration-nextjs-edge-event-processors branch April 29, 2026 07:59
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.

Event processor migration: NextJS edge event processors

2 participants