Skip to content

test(nextjs): Run nextjs-16-tunnel on Cloudflare - #25161

Merged
JPeer264 merged 1 commit into
developfrom
jp/nextjs-16-tunnel-cloudflare
Oct 13, 2026
Merged

JPeer264 merged 1 commit into
developfrom
jp/nextjs-16-tunnel-cloudflare

Conversation

@JPeer264

@JPeer264 JPeer264 commented Oct 8, 2026

Copy link
Copy Markdown
Member

follow up to #24998

Description

This adds an optional Cloudflare (OpenNext) variant to nextjs-16-tunnel, so the tunnel route tests also run on Workers with withSentry from @sentry/nextjs/cloudflare.

Why

Only unit tests covered that withSentry does not sample requests to the tunnel route. The Worker sends its spans to the proxy server, so the existing check for middleware spans of tunnel requests fails when a tunnel request is sampled.

@JPeer264
JPeer264 added this pull request to stack #25035 October 8, 2026 09:03
@github-actions

github-actions Bot commented Oct 8, 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 29.82 kB - -
@sentry/browser - with treeshaking flags 27.95 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.86 kB - -
@sentry/browser (incl. Tracing) 51.88 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.9 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.83 kB - -
@sentry/browser (incl. Tracing, Replay) 91.65 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.5 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.37 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.33 kB - -
@sentry/browser (incl. Feedback) 47.34 kB - -
@sentry/browser (incl. sendFeedback) 34.87 kB - -
@sentry/browser (incl. FeedbackAsync) 39.98 kB - -
@sentry/browser (incl. Metrics) 30.84 kB - -
@sentry/browser (incl. Logs) 31.13 kB - -
@sentry/browser (incl. Metrics & Logs) 31.77 kB - -
@sentry/react 31.65 kB - -
@sentry/react (incl. Tracing) 54.21 kB - -
@sentry/vue 37.89 kB - -
@sentry/vue (incl. Tracing) 54.81 kB - -
@sentry/svelte 29.84 kB - -
@sentry/remix (Remix 3 client bundle) 56.91 kB - -
CDN Bundle 31.55 kB - -
CDN Bundle (incl. Tracing) 52.41 kB - -
CDN Bundle (incl. Logs, Metrics) 33.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.34 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.67 kB - -
CDN Bundle (incl. Tracing, Replay) 90.06 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.18 kB - -
CDN Bundle - uncompressed 92.91 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.53 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.45 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.48 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.48 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.7 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.63 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.33 kB - -
@sentry/nextjs (client) 56.62 kB - -
@sentry/sveltekit (client) 52.27 kB - -
@sentry/core/server 40.91 kB - -
@sentry/core/browser 13.74 kB - -
@sentry/node 151.76 kB +0.01% +8 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.77 kB - -
@sentry/node - without tracing 94.32 kB +0.01% +9 B 🔺
@sentry/node - without channel injection 129.94 kB +0.01% +9 B 🔺
@sentry/aws-serverless 102.48 kB +0.01% +4 B 🔺
@sentry/cloudflare (withSentry) - minified 210.2 kB - -
@sentry/cloudflare (withSentry) 521.15 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 227.88 kB - -

View base workflow run

@JPeer264
JPeer264 marked this pull request as ready for review October 8, 2026 09:33
@JPeer264 JPeer264 self-assigned this Oct 8, 2026
@JPeer264
JPeer264 force-pushed the jp/nextjs-16-tunnel-cloudflare branch 2 times, most recently from 4d3f791 to c9fcf8b Compare October 8, 2026 11:28
Base automatically changed from jp/vinext-e2e-tests to develop October 12, 2026 11:18
nextjs-16-tunnel gets an optional Cloudflare variant that builds with
`opennextjs-cloudflare` and wraps the Worker in `worker.ts` with
`withSentry` from `@sentry/nextjs/cloudflare`. The tunnel route tests then
also run on Workers.

The Worker sends its spans to the proxy server through `tunnel`, so the
check that tunnel requests create no middleware spans sees the spans of the
Worker. Without the tunnel route handling of `withSentry`, a tunnel request
is sampled and this check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/nextjs-16-tunnel-cloudflare branch from c9fcf8b to cba0a04 Compare October 12, 2026 11:18
@JPeer264
JPeer264 merged commit 6e73dfc into develop Oct 13, 2026
43 checks passed
@JPeer264
JPeer264 deleted the jp/nextjs-16-tunnel-cloudflare branch October 13, 2026 15:14
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