Skip to content

feat(astro): Add @sentry/astro/integration entry for the Astro integration - #25726

Merged
isaacs merged 2 commits into
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time-solidstartfrom
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time
Oct 30, 2026
Merged

isaacs merged 2 commits into
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time-solidstartfrom
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time

Conversation

@isaacs

@isaacs isaacs commented Oct 23, 2026

Copy link
Copy Markdown
Member

The root entry of @sentry/astro is both the server runtime SDK and, through its default export, the Astro integration for astro.config. The integration imports @sentry/bundler-plugins/vite, the orchestrion Vite plugin, fs and createRequire, so the server runtime entry reaches all of them. Any tool that traces or bundles the server entry then pulls that tooling in.

The new @sentry/astro/integration entry exports the integration as its default and as sentryAstro. The root default export stays, deprecated, until the next major version, so existing astro.config files keep working. The E2E apps use the new entry.

The new entry has a node condition that points at the ESM build, the same as ./middleware. The CJS build of @sentry/astro does not load under the package's "type": "module", and the existing entries avoid it the same way.

Fixes #25676


Stack created with GitHub Stacks CLI • Give Feedback 💬

@isaacs
isaacs requested a review from a team as a code owner October 23, 2026 21:20
@isaacs
isaacs added this pull request to stack #25727 October 23, 2026 21:20
@isaacs
isaacs requested review from chargome and s1gr1d and removed request for a team October 23, 2026 21:20
@linear-code

linear-code Bot commented Oct 23, 2026

Copy link
Copy Markdown

JS-3989

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 80ea09f (PR test merge using develop at db8b096)

Against: c9b4058 (develop) · base run #64518

⚠️ Baseline mismatch: 4 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 db8b096 finishes.

Path Size % Change Change
@sentry/browser 30.39 kB - -
@sentry/browser - with treeshaking flags 28.54 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.42 kB - -
@sentry/browser (incl. Tracing) 52.71 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.72 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.69 kB - -
@sentry/browser (incl. Tracing, Replay) 93.01 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.76 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.75 kB - -
@sentry/browser (incl. Feedback) 47.98 kB - -
@sentry/browser (incl. sendFeedback) 35.5 kB - -
@sentry/browser (incl. FeedbackAsync) 40.6 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.72 kB - -
@sentry/browser (incl. Metrics & Logs) 32.44 kB - -
@sentry/react 32.28 kB - -
@sentry/react (incl. Tracing) 55.08 kB - -
@sentry/vue 38.66 kB - -
@sentry/vue (incl. Tracing) 55.73 kB - -
@sentry/svelte 30.42 kB - -
@sentry/remix (Remix 3 client bundle) 57.79 kB - -
CDN Bundle 32.18 kB - -
CDN Bundle (incl. Tracing) 53.23 kB - -
CDN Bundle (incl. Logs, Metrics) 34.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.17 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.87 kB - -
CDN Bundle (incl. Tracing, Replay) 91.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.55 kB - -
CDN Bundle - uncompressed 94.64 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.6 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.11 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.34 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.68 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 279.29 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 293 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 298.71 kB - -
@sentry/nextjs (client) 58.03 kB - -
@sentry/sveltekit (client) 53.23 kB - -
@sentry/core/server 44.24 kB - -
@sentry/core/browser 13.93 kB - -
@sentry/node 155.65 kB +0.02% +27 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.16 kB - -
@sentry/node - without tracing 96.79 kB +0.03% +21 B 🔺
@sentry/node - without channel injection 136.02 kB +0.02% +25 B 🔺
@sentry/aws-serverless 104.99 kB +0.02% +20 B 🔺
@sentry/cloudflare (withSentry) - minified 200.64 kB - -
@sentry/cloudflare (withSentry) 499 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 221.18 kB - -

View base workflow run

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 3 not successful, 51 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Failing after 45s Details
❌ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Failing after 33s Details
❌ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Failing after 2m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 21s Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 24s Details
✅ CI: Optional E2E Tests / E2E node-eve (latest) Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (latest) Test (optional) Successful in 29s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 28s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 26s Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 28s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 25s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 29s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 44s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry 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 node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 20s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 15s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 (tracer provider) Test (optional) Successful in 28s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 25s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 19s Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 23s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 24s Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 22s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry-static Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 16s Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 27s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 22s Details

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

thanks!

@isaacs
isaacs requested review from a team as code owners October 29, 2026 18:12
@isaacs
isaacs requested review from andreiborza, logaretm, msonnb and mydea and removed request for a team October 29, 2026 18:13
…gration

The root entry of `@sentry/astro` is both the server runtime SDK and,
through its default export, the Astro integration for `astro.config`.
The integration imports `@sentry/bundler-plugins/vite`, the orchestrion
Vite plugin, `fs` and `createRequire`, so the server runtime entry
reaches all of them. Any tool that traces or bundles the server entry
then pulls that tooling in.

The new `@sentry/astro/integration` entry exports the integration as its
default and as `sentryAstro`. The root default export stays, deprecated,
until the next major version, so existing `astro.config` files keep
working. The E2E apps use the new entry.

The new entry has a `node` condition that points at the ESM build, the
same as `./middleware`. The CJS build of `@sentry/astro` does not load
under the package's `"type": "module"`, and the existing entries avoid
it the same way.

Refs #25676

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@isaacs
isaacs force-pushed the isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time branch from 935b98a to 39bcd92 Compare October 29, 2026 18:14
@isaacs
isaacs enabled stacked auto-merge (squash) October 30, 2026 19:08
@isaacs
isaacs merged commit f74a45d into develop Oct 30, 2026
722 of 727 checks passed
@isaacs
isaacs deleted the isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time branch October 30, 2026 21:08
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.

Guard server runtime entries against pulling in build-time tooling

2 participants