Skip to content

feat(v10/cloudflare): Read wrangler config and resolve the Sentry options module#22538

Draft
andreiborza wants to merge 1 commit into
v10from
ab/backport-22421-wrangler-config
Draft

feat(v10/cloudflare): Read wrangler config and resolve the Sentry options module#22538
andreiborza wants to merge 1 commit into
v10from
ab/backport-22421-wrangler-config

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Backport of: #22421

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e7010a7. Configure here.

optionsFn: OPTIONS_IMPORT_IDENTIFIER,
importStmt: `import ${OPTIONS_IMPORT_IDENTIFIER} from '${relativePath}';\n`,
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused instrument file helpers

Medium Severity

ENV_FALLBACK_OPTIONS_FN, resolveInstrumentFile, and buildOptionsImport are never imported by production or test code, and resolveWranglerConfig is not wired into sentryCloudflareVitePlugin. Because rollup only bundles from entrypoints, these modules also never ship in the published Vite plugin bundle.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e7010a7. Configure here.

config: { main: raw.main, durableObjects },
configDir: dirname(raw.configPath ?? configPath),
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feat PR lacks integration tests

Medium Severity

This is a feat PR but only adds unit tests. Per the PR review guidelines, feat PRs need at least one integration or E2E test; none cover wrangler-config resolution, instrument-file lookup, or defineCloudflareOptions end-to-end with the Vite plugin.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit e7010a7. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.6 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.36 kB added added
@sentry/browser (incl. Tracing, Replay) 85.85 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.48 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.21 kB added added
@sentry/browser (incl. Feedback) 44.93 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.56 kB added added
@sentry/react (incl. Tracing) 48.87 kB added added
@sentry/vue 33.19 kB added added
@sentry/vue (incl. Tracing) 48.56 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.16 kB added added
CDN Bundle (incl. Tracing) 48.56 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB added added
CDN Bundle (incl. Tracing, Replay) 86.06 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.37 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB added added
CDN Bundle - uncompressed 89.91 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.79 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.62 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.77 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.38 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.99 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.73 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.68 kB added added
@sentry/nextjs (client) 51.41 kB added added
@sentry/sveltekit (client) 47.02 kB added added
@sentry/core/server 80.3 kB added added
@sentry/core/browser 66.72 kB added added
@sentry/node-core 63.23 kB added added
@sentry/node 125.82 kB added added
@sentry/node (incl. diagnostics channel injection) 151.28 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.37 kB added added
@sentry/node - without tracing 74.95 kB added added
@sentry/aws-serverless 84.19 kB added added
@sentry/cloudflare (withSentry) - minified 197.74 kB added added
@sentry/cloudflare (withSentry) 486.69 kB added added

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