Repository navigation
fix(v10/astro): defer to @sentry/cloudflare/vite on Cloudflare Workers - #25530
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Backport of: #25347 Co-Authored-By: Jan VamPeer Stöcklmair <jan.peer@sentry.io>
Contributor
size-limit report 📦
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of: #25347
Differences to the original PR
packages/astro/src/integration/index.ts: v10's Astro integration has no orchestrion plugin, so the hunk that skips it when the Cloudflare plugin is present is dropped. On v10,sentryCloudflareVitePlugin()only wraps the Worker with_experimental.autoInstrumentation: true, and only that sub-plugin (sentry-cloudflare-auto-instrument) has thesentry-cloudflare-prefix. So the integration defers only in that setup. With the plugin's defaults, or withuseDiagnosticsChannelInjectionalone, it keeps its own wrap and default server init. The detection code is unchanged; the comments describe the v10 behavior.packages/astro/test/integration/index.test.ts: thedescribe.eachcases use v10's plugin sets (sentry-cloudflare-auto-instrument, pluscode-transformerwithuseDiagnosticsChannelInjection) in place of develop's default andautoInstrumentation: falsesets. TheorchestrionViteassertions are dropped. Added a case where only the orchestrion transform is present, which checks that the integration keeps its own Worker wrap. The orchestrion tests on develop next to these cases are not included, because that feature isn't on v10.astro-6-cf-workerse2e app:astro.config.mjspasses_experimental: { autoInstrumentation: true }, because auto-instrumentation is opt-in on v10.cloudflare-autoinstrument-package-entrye2e app: deleted, as in the original. Its v10 version (from fix(v10/cloudflare): auto-instrument when wranglermainis a package #25430) already differed from develop in its test assertions and dependencies.Fixes #21901
Fixes #25344
via Jan Peer Stöcklmair.
--
View Junior Session [Sentry]