Repository navigation
Conversation
…er config Cloudflare events had no `server_name` and no runtime version, so events could not be grouped or filtered by Worker. `getFinalOptions` now reads `serverName` from the `SENTRY_NAME` variable of `env`. The Vite plugin also stores the `name` and `compatibility_date` of the wrangler config in the Worker entry, also for handlers that are wrapped by hand. `CloudflareClient` uses the name as the default `serverName` and the compatibility date as `runtime.version`, because workerd exposes no version at runtime. The plugin uses a global value and not a Vite `define`, because Vite does not apply `define` to pre-bundled dependencies in dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
size-limit report 📦Compared: a3d2707 (PR test merge using develop at c7b765f) Against: c7b765f (develop) · base run #66318 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 3 not successful, 34 successful. See the run.
Successful checks
|
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.
closes #24040
closes JS-3575
Description
This sets
server_nameand the runtime version on Cloudflare events.server_namecomes from theSENTRY_NAMEvariable ofenv, else from thenameof the wrangler config. The runtime version is thecompatibility_dateof the wrangler config.sentryCloudflareVitePluginwrites both wrangler values into the Worker entry at build time, also when you wrap the handler yourself. Logs and metrics getserver.addressfrom the same server name.Version decisions
workerd exposes no version at runtime, so the version is the compatibility date, which selects the workerd behavior of the Worker. The alternative is to leave the version empty.
Known issues
sentryCloudflareVitePlugin, onlySENTRY_NAMEor theserverNameoption setsserver_name, and events have no runtime version.Sentry events
Without the plugin values (same as
develop): https://sentry-sdks.sentry.io/issues/7850779574/events/cd8261c3c7d84022b2f4baeeafa18bf8/With the plugin values: https://sentry-sdks.sentry.io/issues/7850779574/events/3375bc8be6ba47f2aa8ba95cefe0e064/