feat(docs): enable sourcemap upload, releases, and environment tracking#705
feat(docs): enable sourcemap upload, releases, and environment tracking#705
Conversation
- Disable @sentry/astro's built-in upload (avoids 20MB @sentry/cli binary) - Use our own CLI post-build: sentry sourcemap inject + upload - Add environment tracking: production (main/release), staging (PR preview), development (local) - Add release name from root package.json version - Associate cli-website project with CLI releases in sentry-release.yml - Enable Vite sourcemap generation (hidden mode)
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Dashboard
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1564 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.29% 95.31% +0.02%
==========================================
Files 229 229 —
Lines 33377 33378 +1
Branches 0 0 —
==========================================
+ Hits 31808 31814 +6
- Misses 1569 1564 -5
- Partials 0 0 —Generated by Codecov Action |
|
…d binary Move sourcemap inject+upload out of build-docs into a new upload-docs-sourcemaps job that depends on both build-binary and build-docs. Downloads the compiled linux-x64 binary and uses it to inject debug IDs and upload sourcemaps — doubles as a smoke test for the compiled binary.
- Move inject step into build-docs (before packaging) so deployed files have debug IDs for runtime _sentryDebugIds registration - Use SENTRY_ORG/SENTRY_PROJECT env vars instead of invalid positional arg - Remove separate upload-docs-sourcemaps job (merged into build-docs) - Delete .map files after upload (not needed in production) - build-docs now depends on build-binary to use compiled CLI
….map in preview - Remove release option from sentry() integration (ignored in @sentry/astro v10) - Set release in Sentry.init() via PUBLIC_SENTRY_RELEASE/SENTRY_RELEASE env vars - Add .map file cleanup to docs-preview.yml before deploy
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2cf3d4a. Configure here.

Summary
Enable sourcemap resolution and environment tracking for the docs site (cli.sentry.dev /
cli-websiteSentry project).@sentry/clibinary)productionon main/release,stagingon PR previews,developmentlocallypackage.jsoncli-websiteproject associated with CLI releases insentry-release.ymlChanges
docs/astro.config.mjs: Disable@sentry/astroplugin upload, enable Vite sourcemap generation (hidden), addenvironmentandreleasedocs/sentry.client.config.js: AddenvironmentfromPUBLIC_SENTRY_ENVIRONMENTdocs/sentry.server.config.js: AddenvironmentfromPUBLIC_SENTRY_ENVIRONMENT.github/workflows/ci.yml: Post-buildsentry sourcemap inject+upload(push to main/release only).github/workflows/docs-preview.yml: Same post-build inject+upload for PR previews.github/workflows/sentry-release.yml: Addcli-websiteto--projectin release create