Skip to content

feat(astro): Serve the managed tunnel from the Sentry middleware - #25419

Draft
logaretm wants to merge 2 commits into
awad/tunnel-nitrofrom
awad/tunnel-astro
Draft

logaretm wants to merge 2 commits into
awad/tunnel-nitrofrom
awad/tunnel-astro

Conversation

@logaretm

@logaretm logaretm commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

This PR adds the tunnel wiring to the astro SDK. We already had a global middleware active, so it works by adding logic to check if the incoming request is a tunnel request and if it is, then it will be handled.

This also respects the decision made earlier to follow the base path configured by the user.

@logaretm
logaretm added this pull request to stack #25201 October 15, 2026 16:04
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.67 kB +2.66% +794 B 🔺
@sentry/browser - with treeshaking flags 28.54 kB +1.86% +519 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 28.42 kB +1.81% +503 B 🔺
@sentry/browser (incl. Tracing) 52.86 kB +1.52% +791 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 52.87 kB +1.54% +799 B 🔺
@sentry/browser (incl. Tracing, Profiling) 55.78 kB +1.39% +763 B 🔺
@sentry/browser (incl. Tracing, Replay) 92.59 kB +0.84% +770 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.18 kB +0.62% +494 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.32 kB +0.8% +770 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 110.28 kB +0.73% +796 B 🔺
@sentry/browser (incl. Feedback) 48.19 kB +1.69% +797 B 🔺
@sentry/browser (incl. sendFeedback) 35.75 kB +2.33% +812 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.85 kB +2% +799 B 🔺
@sentry/browser (incl. Metrics) 31.66 kB +2.46% +759 B 🔺
@sentry/browser (incl. Logs) 31.94 kB +2.43% +757 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.64 kB +2.62% +831 B 🔺
@sentry/react 32.48 kB +2.44% +773 B 🔺
@sentry/react (incl. Tracing) 55.15 kB +1.41% +766 B 🔺
@sentry/vue 38.82 kB +2.06% +782 B 🔺
@sentry/vue (incl. Tracing) 55.8 kB +1.44% +789 B 🔺
@sentry/svelte 30.7 kB +2.69% +802 B 🔺
@sentry/remix (Remix 3 client bundle) 57.9 kB +1.44% +818 B 🔺
CDN Bundle 32.09 kB +1.41% +445 B 🔺
CDN Bundle (incl. Tracing) 53.05 kB +0.89% +465 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.29 kB +1.34% +452 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 54.99 kB +0.86% +465 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.23 kB +0.62% +462 B 🔺
CDN Bundle (incl. Tracing, Replay) 90.72 kB +0.53% +475 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.7 kB +0.57% +523 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.84 kB +0.46% +438 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.88 kB +0.55% +535 B 🔺
CDN Bundle - uncompressed 94.32 kB +1.23% +1.14 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 157.16 kB +0.73% +1.13 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.86 kB +1.15% +1.14 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.12 kB +0.7% +1.13 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 230.9 kB +0.5% +1.14 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.33 kB +0.41% +1.13 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.27 kB +0.41% +1.13 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 291.03 kB +0.39% +1.13 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 296.96 kB +0.39% +1.13 kB 🔺
@sentry/nextjs (client) 57.56 kB +1.35% +762 B 🔺
@sentry/sveltekit (client) 53.28 kB +1.58% +827 B 🔺
@sentry/core/server 41.75 kB +1.53% +628 B 🔺
@sentry/core/browser 13.81 kB - -
@sentry/node 153.5 kB +0.43% +654 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.84 kB - -
@sentry/node - without tracing 95.29 kB +0.7% +658 B 🔺
@sentry/node - without channel injection 131.75 kB +0.51% +666 B 🔺
@sentry/aws-serverless 103.54 kB +0.73% +748 B 🔺
@sentry/cloudflare (withSentry) - minified 212.26 kB +0.79% +1.66 kB 🔺
@sentry/cloudflare (withSentry) 525.9 kB +0.65% +3.38 kB 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 229.93 kB +0.73% +1.66 kB 🔺

View base workflow run

@logaretm
logaretm force-pushed the awad/tunnel-astro branch 2 times, most recently from 3dfbedc to e9cafef Compare October 15, 2026 16:38
@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/astro/src/server/middleware.ts
@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.

✅ 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 40a29bc. Configure here.

@logaretm
logaretm force-pushed the awad/tunnel-astro branch 2 times, most recently from 3c79c4e to cd1c651 Compare October 16, 2026 14:00
The Sentry middleware runs first and answers tunnel requests. The integration
hands Astro's `base` and `trailingSlash: 'always'` to both SDKs, so `tunnel: true`
follows Astro's routing without repeating them.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant