-
-
Notifications
You must be signed in to change notification settings - Fork 68
feat(sourcemaps): Add Cloudflare Wrangler Tool Flow #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #999 +/- ##
==========================================
+ Coverage 27.96% 27.98% +0.02%
==========================================
Files 129 130 +1
Lines 13930 14233 +303
Branches 856 882 +26
==========================================
+ Hits 3895 3983 +88
- Misses 10018 10233 +215
Partials 17 17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c7107cb
to
25656cb
Compare
AbhiPrasad
reviewed
May 23, 2025
0559287
to
b0ad164
Compare
Co-authored-by: Abhijeet Prasad <[email protected]>
AbhiPrasad
approved these changes
May 30, 2025
Co-authored-by: Abhijeet Prasad <[email protected]>
chargome
approved these changes
Jun 2, 2025
AbhiPrasad
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Jun 24, 2025
Documents the changes from getsentry/sentry-wizard#999 ref getsentry/sentry-javascript#14841 A new sourcemaps guide for Wrangler was added to the Cloudflare documentation. * A new guide, `docs/platforms/javascript/common/sourcemaps/uploading/wrangler.mdx`, was created. * It details both automatic setup via the Sentry Wizard and manual configuration. * Manual steps include installing `@sentry/cli`, configuring `sentry-cli`, and modifying the `package.json` scripts. * The `deploy` script is updated to include `--outdir`, `--upload-source-maps`, and `--var SENTRY_RELEASE:$(sentry-cli releases propose-version)`. * A `sentry:sourcemaps` script is added to create releases and upload sourcemaps. * A `postdeploy` script is introduced to automatically run the `sentry:sourcemaps` command after deployment. * Instructions for configuring the Sentry SDK with `release: env.SENTRY_RELEASE` are provided. * The guide is marked as `supported: [javascript.cloudflare]` to ensure platform-specific visibility. * `platform-includes/sourcemaps/overview/javascript.cloudflare.mdx` was updated to include a "Cloudflare-Specific Tools" section, linking to the new Wrangler guide. * `platform-includes/sourcemaps/upload/primer/javascript.cloudflare.mdx` was modified to include the updated Cloudflare overview. These changes ensure that Wrangler users have a dedicated guide for sourcemap uploads, integrated seamlessly into the Cloudflare platform documentation. --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Alex Krawiec <[email protected]>
bitsandfoxes
pushed a commit
to getsentry/sentry-docs
that referenced
this pull request
Jul 3, 2025
Documents the changes from getsentry/sentry-wizard#999 ref getsentry/sentry-javascript#14841 A new sourcemaps guide for Wrangler was added to the Cloudflare documentation. * A new guide, `docs/platforms/javascript/common/sourcemaps/uploading/wrangler.mdx`, was created. * It details both automatic setup via the Sentry Wizard and manual configuration. * Manual steps include installing `@sentry/cli`, configuring `sentry-cli`, and modifying the `package.json` scripts. * The `deploy` script is updated to include `--outdir`, `--upload-source-maps`, and `--var SENTRY_RELEASE:$(sentry-cli releases propose-version)`. * A `sentry:sourcemaps` script is added to create releases and upload sourcemaps. * A `postdeploy` script is introduced to automatically run the `sentry:sourcemaps` command after deployment. * Instructions for configuring the Sentry SDK with `release: env.SENTRY_RELEASE` are provided. * The guide is marked as `supported: [javascript.cloudflare]` to ensure platform-specific visibility. * `platform-includes/sourcemaps/overview/javascript.cloudflare.mdx` was updated to include a "Cloudflare-Specific Tools" section, linking to the new Wrangler guide. * `platform-includes/sourcemaps/upload/primer/javascript.cloudflare.mdx` was modified to include the updated Cloudflare overview. These changes ensure that Wrangler users have a dedicated guide for sourcemap uploads, integrated seamlessly into the Cloudflare platform documentation. --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Alex Krawiec <[email protected]>
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.
This PR adds a Cloudflare Wrangler tool flow to the source maps wizard. Because wrangler doesn't allow us to inject debug ids after build and before deployment, we have to resort to our release-based legacy upload strategy.
Therefore, this setup flow needs to do the following things:
wrangler deploy
npm script tosentry-cli releases propose-version
--outdir
argSENTRY_RELEASE
environment variable--upload-source-maps
arg so that we can guarantee that source maps are emitted into the outdirsentry:sourcemaps
npm script thatsentry-cli releases propose-version
postdeploy
script that invokes thesentry:sourcemaps
script.sentryclirc
file and.gitignore
itAdditionally, because of the release based stuff, I decided to show a note at the beginning that this setup is a bit limited and more complicated and we'd generally recommend using the CF Vite plugin + the
vite
sourcemaps wizard flow.Example:
Screen.Recording.2025-05-21.at.14.32.59.mov
(note in this video, the wizard is only permanently installed because that's the easiest way to run it locally)
I'll add an e2e test but probably in a different PR because I wanna try something out to simplify the e2e tests
closes #824