Skip to content

fix(astro): Report the Astro SDK name with the Cloudflare Vite plugin - #26848

Merged
JPeer264 merged 1 commit into
jp/astro-bun-deno-entriesfrom
jp/astro-cloudflare-sdk-name
Nov 25, 2026
Merged

JPeer264 merged 1 commit into
jp/astro-bun-deno-entriesfrom
jp/astro-cloudflare-sdk-name

Conversation

@JPeer264

Copy link
Copy Markdown
Member

part of #24840

Description

This makes @sentry/astro report sentry.javascript.astro when the app uses sentryCloudflareVitePlugin() from @sentry/cloudflare/vite. The Astro middleware sets the name on the client and keeps @sentry/cloudflare in the SDK packages.

Why

With that plugin, @sentry/cloudflare inits the client, so events had the SDK name sentry.javascript.cloudflare. The other Cloudflare setups of @sentry/astro already report the Astro name (#26302).

SDK name decisions

The middleware sets the name at request time, the same as nestIntegration() does in its setup. The alternative is a build-time change that gives the metadata to the withSentry wrap of @sentry/cloudflare/vite.

@JPeer264
JPeer264 added this pull request to stack #26849 November 25, 2026 08:02
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: fa3d73a (PR test merge using develop at 1b863a9)

Against: cee40e6 (develop) · base run #67873

⚠️ Baseline mismatch: 2 develop commit(s) in the PR build are missing from the baseline; 1 develop commit(s) in the baseline are missing from the PR build. Their size changes also affect this comparison. Compare commits. Rebase your PR onto the latest develop to compare against an up-to-date baseline.

Path Size % Change Change
@sentry/browser 30.54 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.6 kB - -
@sentry/browser (incl. Tracing) 53.67 kB - -
@sentry/browser (incl. Tracing Core) 40.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.67 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.57 kB - -
@sentry/browser (incl. Tracing, Replay) 93.6 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.43 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.4 kB - -
@sentry/browser (incl. Feedback) 48.4 kB - -
@sentry/browser (incl. sendFeedback) 31.11 kB - -
@sentry/browser (incl. FeedbackAsync) 36.17 kB - -
@sentry/browser (incl. Metrics) 31.86 kB - -
@sentry/browser (incl. Logs) 32.13 kB - -
@sentry/browser (incl. Metrics & Logs) 32.8 kB - -
@sentry/react 32.56 kB - -
@sentry/react (incl. Tracing) 56.38 kB - -
@sentry/vue 38.75 kB - -
@sentry/vue (incl. Tracing) 56.68 kB - -
@sentry/svelte 30.57 kB - -
@sentry/effect (client) 42.25 kB +0.08% +33 B 🔺
@sentry/effect (client, incl. Tracing) 54.97 kB +0.02% +7 B 🔺
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.35 kB +0.07% +43 B 🔺
@sentry/remix (Remix 3 client bundle) 59.39 kB - -
CDN Bundle 32.54 kB - -
CDN Bundle (incl. Tracing) 54.15 kB - -
CDN Bundle (incl. Logs, Metrics) 35.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.63 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.22 kB - -
CDN Bundle (incl. Tracing, Replay) 91.94 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.86 kB - -
CDN Bundle - uncompressed 94.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.61 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.65 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.28 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.58 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300.2 kB - -
@sentry/nextjs (client) 60.09 kB - -
@sentry/sveltekit (client) 55.03 kB - -
@sentry/core/server 45.83 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 156.94 kB +0.01% +3 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.81 kB - -
@sentry/node - without channel injection 145.89 kB +0.01% +3 B 🔺
@sentry/aws-serverless 100.44 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 211.93 kB - -
@sentry/cloudflare (withSentry) 491.77 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 214.88 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 237.17 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

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

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details

@JPeer264
JPeer264 force-pushed the jp/astro-cloudflare-sdk-name branch from 6a1d884 to 652168c Compare November 25, 2026 08:13
@JPeer264
JPeer264 force-pushed the jp/astro-cloudflare-sdk-name branch from 652168c to 1f035be Compare November 25, 2026 08:26
@JPeer264 JPeer264 self-assigned this Nov 25, 2026
With sentryCloudflareVitePlugin() of @sentry/cloudflare/vite, @sentry/astro
adds no Worker wrap and no init of its own, so @sentry/cloudflare inits the
client and events had the SDK name sentry.javascript.cloudflare. The other
Cloudflare setups of @sentry/astro already report sentry.javascript.astro.

The Astro middleware now sets the Astro SDK name on a client that has
another name, and keeps the package of that SDK in the list, like the
NestJS integration does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/astro-cloudflare-sdk-name branch from 1f035be to a9acbbb Compare November 25, 2026 08:46
@JPeer264
JPeer264 marked this pull request as ready for review November 25, 2026 09:57
@JPeer264
JPeer264 merged commit 300e09c into develop Nov 25, 2026
119 checks passed
@JPeer264
JPeer264 deleted the jp/astro-cloudflare-sdk-name branch November 25, 2026 13:16
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.

2 participants