Skip to content

test: Check that runtimes drop the server spans of managed tunnel requests - #25414

Open
logaretm wants to merge 5 commits into
awad/tunnel-tanstackstartfrom
awad/tunnel-cloudflare
Open

logaretm wants to merge 5 commits into
awad/tunnel-tanstackstartfrom
awad/tunnel-cloudflare

Conversation

@logaretm

@logaretm logaretm commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Runtimes only translate tunnel: true while meta-frameworks answer the requests, so nothing pinned down that their server spans get dropped.

This PR asserts that runtime SDKs level (Cloudflare, Node, Bun and Deno) ignores the tunneled span so we don't have to chase it around. This is one benefit of having tunnels as a core SDK capability, this PR just tests that.

Node, Deno and Cloudflare live in their integration test suites, and Bun is a unit test in its package.

For reviewers: if you need an overview of what this is, refer to #25199.

closes #25462

@logaretm
logaretm added this pull request to stack #25201 October 15, 2026 15:33
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 323db37 to 776be29 Compare October 15, 2026 15:36
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 12757d0 (PR test merge using develop at 287ad6a)

Against: d4a4e81 (develop) · base run #62971

⚠️ Baseline mismatch: 61 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for 287ad6a finishes.

Path Size % Change Change
@sentry/browser 30.56 kB +2.18% +651 B 🔺
@sentry/browser - with treeshaking flags 28.54 kB +1.76% +491 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.42 kB +1.69% +470 B 🔺
@sentry/browser (incl. Tracing) 52.8 kB +1.35% +702 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.8 kB +1.35% +699 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.77 kB +1.31% +720 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.47 kB +0.68% +621 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.21 kB +0.61% +492 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB +0.66% +633 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.2 kB +0.63% +687 B 🔺
@sentry/browser (incl. Feedback) 48.12 kB +1.49% +703 B 🔺
@sentry/browser (incl. sendFeedback) 35.63 kB +1.9% +664 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.76 kB +1.71% +684 B 🔺
@sentry/browser (incl. Metrics) 31.57 kB +2.05% +634 B 🔺
@sentry/browser (incl. Logs) 31.84 kB +2.02% +629 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.52 kB +2.12% +673 B 🔺
@sentry/react 32.37 kB +1.99% +630 B 🔺
@sentry/react (incl. Tracing) 55.05 kB +1.17% +635 B 🔺
@sentry/vue 38.71 kB +1.7% +646 B 🔺
@sentry/vue (incl. Tracing) 55.75 kB +1.3% +715 B 🔺
@sentry/svelte 30.59 kB +2.2% +656 B 🔺
@sentry/remix (Remix 3 client bundle) 57.84 kB +1.27% +722 B 🔺
CDN Bundle 32.14 kB +1.5% +474 B 🔺
CDN Bundle (incl. Tracing) 53.09 kB +0.92% +480 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.34 kB +1.4% +471 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 55.04 kB +0.89% +484 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.29 kB +0.67% +499 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.75 kB +0.53% +476 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.69 kB +0.52% +479 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.89 kB +0.49% +470 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.86 kB +0.5% +486 B 🔺
CDN Bundle - uncompressed 94.44 kB +1.24% +1.15 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.29 kB +0.74% +1.15 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.99 kB +1.16% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.26 kB +0.72% +1.15 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.03 kB +0.51% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.46 kB +0.42% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.42 kB +0.41% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.16 kB +0.4% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.11 kB +0.39% +1.15 kB 🔺
@sentry/nextjs (client) 57.91 kB +1.05% +601 B 🔺
@sentry/sveltekit (client) 53.11 kB +1.21% +634 B 🔺
@sentry/core/server 43.52 kB +4.13% +1.73 kB 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 153.28 kB +0.44% +659 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.58 kB - -
@sentry/node - without tracing 94.9 kB +0.69% +649 B 🔺
@sentry/node - without channel injection 133.92 kB +0.47% +617 B 🔺
@sentry/aws-serverless 103.15 kB +0.7% +713 B 🔺
@sentry/cloudflare (withSentry) - minified 213.13 kB +0.96% +2.02 kB 🔺
@sentry/cloudflare (withSentry) 528.73 kB +0.94% +4.9 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 232.75 kB +0.88% +2.01 kB 🔺

View base workflow run

@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 776be29 to e0f36f5 Compare October 15, 2026 15:51
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 4a248fa to 37afe7c Compare October 15, 2026 16:38
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 37afe7c to 03d8225 Compare October 15, 2026 17:15
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 03d8225 to 3e455f4 Compare October 15, 2026 17:36
@logaretm logaretm changed the title feat(cloudflare): Serve the managed tunnel from the request wrapper test: Check that runtimes drop the server spans of managed tunnel requests Oct 15, 2026
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 3e455f4 to fa2d7a6 Compare October 15, 2026 17:44
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from fa2d7a6 to 034ec1f Compare October 15, 2026 18:16
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 034ec1f to b254fc1 Compare October 15, 2026 18:26
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from b254fc1 to b8540c7 Compare October 15, 2026 18:28
@logaretm

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.

Comment thread packages/cloudflare/test/request.test.ts Outdated
Comment thread dev-packages/node-integration-tests/suites/tracing/managed-tunnel/test.ts Outdated
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from b8540c7 to a729215 Compare October 16, 2026 01:51
@logaretm

Copy link
Copy Markdown
Member Author

bugbot run

1 similar comment
@logaretm

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.

@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from a729215 to bcba572 Compare October 16, 2026 02:25
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch 2 times, most recently from 52c1093 to 26d2e6e Compare October 19, 2026 18:15
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch 2 times, most recently from 2531891 to 5ae1c71 Compare October 19, 2026 18:36
@logaretm
logaretm force-pushed the awad/tunnel-cloudflare branch from 5ae1c71 to 2cd301c Compare October 19, 2026 19:12
@logaretm
logaretm marked this pull request as ready for review October 19, 2026 19:36
@logaretm
logaretm requested a review from a team as a code owner October 19, 2026 19:36
@logaretm
logaretm requested review from JPeer264 and isaacs and removed request for a team October 19, 2026 19:36
@logaretm
logaretm requested review from a team as code owners October 19, 2026 20:07
@logaretm
logaretm requested review from chargome and s1gr1d and removed request for a team October 19, 2026 20:07

const DSN = 'https://username@domain/123';

Deno.test('Deno.serve drops the server span of managed tunnel requests', async () => {

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.

q: Do we need this test? Theoretically the node integration tests should run under deno too, so this unit test would be a duplication 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah okay, I'm moving both of these tests to their runtime's own tests.

Comment thread packages/cloudflare/test/request.test.ts Outdated

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

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 74fe197. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 6 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nextjs-16 (canary, webpack) Test (optional) Successful in 6m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (canary, turbopack) Test (optional) Successful in 5m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details

…uests

Meta-framework SDKs answer the tunnel requests. Cloudflare, Node, Bun and Deno
only translate `tunnel: true` so the core client drops the server span they
create for them, which these tests pin down.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare managed tunnel

2 participants