Skip to content

Conversation

AbhiPrasad
Copy link
Member

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.

@AbhiPrasad AbhiPrasad requested a review from a team June 20, 2025 13:22
@AbhiPrasad AbhiPrasad self-assigned this Jun 20, 2025
@AbhiPrasad AbhiPrasad requested review from stephanie-anderson and RulaKhaled and removed request for a team June 20, 2025 13:22
Copy link

vercel bot commented Jun 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 4:00pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 4:00pm

Copy link

codecov bot commented Jun 20, 2025

Bundle Report

Changes will increase total bundle size by 711 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.92MB 717 bytes (0.01%) ⬆️
sentry-docs-client-array-push 9.8MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 415.8kB -0.0%
static/n-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/n-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/58chpQwEXiYugTjHa7dzZ/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/58chpQwEXiYugTjHa7dzZ/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 242 bytes 401.72kB 0.06%
../app/platform-redirect/page.js.nft.json 242 bytes 401.63kB 0.06%
../app/sitemap.xml/route.js.nft.json 242 bytes 399.61kB 0.06%


## Manual Setup

### 1. Install Sentry CLI
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### 1. Install Sentry CLI
### 1. Install the Sentry CLI


### 1. Install Sentry CLI

First, install Sentry CLI as a dev dependency:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
First, install Sentry CLI as a dev dependency:
First, install the Sentry CLI as a dev dependency:


1. Going to **Project Settings > Source Maps** in Sentry
2. Checking for your release in the "Artifact Bundles" tab
3. Confirming that source maps are working by triggering an error and checking that the stack trace shows your original source code
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a screenshot or arcade here to demonstrate how this looks in the product.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will add this in a follow-up!


If you encounter build errors when adding source map flags:

1. Make sure you're using a recent version of Wrangler
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a minimum version of Wrangler that's a prerequisite here? If so, let's specify.


## Other Tools

If you're not using one of these tools, we assume you already know how to generate source maps with your toolchain and we recommend you upload them using <PlatformLink to="/sourcemaps/uploading/cli/">Sentry CLI</PlatformLink>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you're not using one of these tools, we assume you already know how to generate source maps with your toolchain and we recommend you upload them using <PlatformLink to="/sourcemaps/uploading/cli/">Sentry CLI</PlatformLink>.
If you're not using one of these tools, we assume you already know how to generate source maps with your toolchain and we recommend you upload them using the <PlatformLink to="/sourcemaps/uploading/cli/">Sentry CLI</PlatformLink>.

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

Looks good! Please see the comment regarding the duplicated content.

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) June 24, 2025 15:39
@AbhiPrasad AbhiPrasad merged commit 5cc62e8 into master Jun 24, 2025
12 checks passed
@AbhiPrasad AbhiPrasad deleted the cursor/create-wrangler-sourcemaps-guide-for-cloudflare-18fb branch June 24, 2025 16:00
bitsandfoxes pushed a commit 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]>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants