From 1c3d28af98338fc7cdc5eedc9ae4971a94cc978b Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 14:23:41 +0000 Subject: [PATCH 1/6] feat(docs): enable sourcemap upload, releases, and environment tracking - 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) --- .github/workflows/ci.yml | 16 ++++++++++++++++ .github/workflows/docs-preview.yml | 16 ++++++++++++++++ .github/workflows/sentry-release.yml | 2 +- docs/astro.config.mjs | 21 +++++++++++++++++---- docs/sentry.client.config.js | 1 + docs/sentry.server.config.js | 1 + 6 files changed, 52 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ec3874a5..729d365a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -674,13 +674,29 @@ jobs: key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }} - if: steps.cache.outputs.cache-hit != 'true' run: bun install --frozen-lockfile + - name: Get CLI version + id: version + run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT" - name: Generate docs content run: bun run generate:schema && bun run generate:docs - name: Build Docs working-directory: docs + env: + PUBLIC_SENTRY_ENVIRONMENT: production + SENTRY_RELEASE: ${{ steps.version.outputs.version }} run: | bun install --frozen-lockfile bun run build + - name: Upload sourcemaps to Sentry + if: github.event_name == 'push' + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + run: | + npx sentry sourcemap inject docs/dist/ + npx sentry sourcemap upload docs/dist/ \ + --release "${{ steps.version.outputs.version }}" \ + --url-prefix "~/" \ + sentry/cli-website - name: Package Docs run: | cp .nojekyll docs/dist/ diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 6cab1ce42..1dcbf8154 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -31,6 +31,10 @@ jobs: - if: steps.cache.outputs.cache-hit != 'true' run: bun install --frozen-lockfile + - name: Get CLI version + id: version + run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT" + - name: Generate docs content run: bun run generate:schema && bun run generate:docs @@ -39,10 +43,22 @@ jobs: env: # Override base path for PR preview (no /cli prefix since preview domain is different) DOCS_BASE_PATH: /pr-preview/pr-${{ github.event.pull_request.number }} + PUBLIC_SENTRY_ENVIRONMENT: staging + SENTRY_RELEASE: ${{ steps.version.outputs.version }} run: | bun install --frozen-lockfile bun run build + - name: Upload sourcemaps to Sentry + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + run: | + npx sentry sourcemap inject docs/dist/ + npx sentry sourcemap upload docs/dist/ \ + --release "${{ steps.version.outputs.version }}" \ + --url-prefix "~/" \ + sentry/cli-website + - name: Ensure .nojekyll at gh-pages root run: | git config user.name "github-actions[bot]" diff --git a/.github/workflows/sentry-release.yml b/.github/workflows/sentry-release.yml index 7697decf0..cd5d0b4a2 100644 --- a/.github/workflows/sentry-release.yml +++ b/.github/workflows/sentry-release.yml @@ -47,7 +47,7 @@ jobs: # The org/ prefix is how org is specified — it is NOT part of the version. # The version portion must match Sentry.init({ release }) exactly. - name: Create release - run: sentry release create "sentry/${VERSION}" --project cli + run: sentry release create "sentry/${VERSION}" --project cli,cli-website # --auto matches the local origin remote against Sentry repo integrations. # continue-on-error: integration may not be configured for all orgs. diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 008e16f4b..c4178658d 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -5,20 +5,33 @@ import { defineConfig } from "astro/config"; // Allow base path override via environment variable for PR previews const base = process.env.DOCS_BASE_PATH || "/"; +// Release name from CI (root package.json version). Undefined in local dev. +const release = process.env.SENTRY_RELEASE; + export default defineConfig({ site: "https://cli.sentry.dev", base, markdown: { smartypants: false, }, + // Generate sourcemaps for Sentry. "hidden" produces .map files without + // adding //# sourceMappingURL comments to the output (the debug IDs + // injected post-build by `sentry sourcemap inject` are used instead). + vite: { + build: { + sourcemap: "hidden", + }, + }, integrations: [ sentry({ project: "cli-website", org: "sentry", - authToken: process.env.SENTRY_AUTH_TOKEN, - sourceMapsUploadOptions: { - enabled: !!process.env.SENTRY_AUTH_TOKEN, - }, + environment: process.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", + release: release ? { name: release } : undefined, + // Disable the plugin's sourcemap upload — it pulls in @sentry/cli + // (20+ MB binary download). We use our own CLI post-build instead + // (see CI workflow: `sentry sourcemap inject` + `sentry sourcemap upload`). + sourceMapsUploadOptions: { enabled: false }, }), starlight({ title: "Sentry CLI", diff --git a/docs/sentry.client.config.js b/docs/sentry.client.config.js index d522858e8..453aa4dea 100644 --- a/docs/sentry.client.config.js +++ b/docs/sentry.client.config.js @@ -2,6 +2,7 @@ import * as Sentry from "@sentry/astro"; Sentry.init({ dsn: "https://2aca5fe97c71868bc3aa7fb48620dc39@o1.ingest.us.sentry.io/4510798755856384", + environment: import.meta.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", sendDefaultPii: true, integrations: [ Sentry.browserTracingIntegration(), diff --git a/docs/sentry.server.config.js b/docs/sentry.server.config.js index c0bc6c4b4..b399aedb6 100644 --- a/docs/sentry.server.config.js +++ b/docs/sentry.server.config.js @@ -2,6 +2,7 @@ import * as Sentry from "@sentry/astro"; Sentry.init({ dsn: "https://2aca5fe97c71868bc3aa7fb48620dc39@o1.ingest.us.sentry.io/4510798755856384", + environment: process.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", sendDefaultPii: true, enableLogs: true, tracesSampleRate: 1.0, From d08dbc2eb706a6602db046286b9c2528b82ffe06 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 14:28:19 +0000 Subject: [PATCH 2/6] fix: use bun to run CLI, skip upload when token unavailable --- .github/workflows/ci.yml | 6 +++--- .github/workflows/docs-preview.yml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 729d365a2..16979b74f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -688,12 +688,12 @@ jobs: bun install --frozen-lockfile bun run build - name: Upload sourcemaps to Sentry - if: github.event_name == 'push' + if: github.event_name == 'push' && env.SENTRY_AUTH_TOKEN != '' env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | - npx sentry sourcemap inject docs/dist/ - npx sentry sourcemap upload docs/dist/ \ + bun run --bun src/bin.ts sourcemap inject docs/dist/ + bun run --bun src/bin.ts sourcemap upload docs/dist/ \ --release "${{ steps.version.outputs.version }}" \ --url-prefix "~/" \ sentry/cli-website diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 1dcbf8154..c5de4dca1 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -50,11 +50,12 @@ jobs: bun run build - name: Upload sourcemaps to Sentry + if: env.SENTRY_AUTH_TOKEN != '' env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | - npx sentry sourcemap inject docs/dist/ - npx sentry sourcemap upload docs/dist/ \ + bun run --bun src/bin.ts sourcemap inject docs/dist/ + bun run --bun src/bin.ts sourcemap upload docs/dist/ \ --release "${{ steps.version.outputs.version }}" \ --url-prefix "~/" \ sentry/cli-website From d696461c4e52aaf9a7888c3d0686bc48aaf41ef6 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 15:09:20 +0000 Subject: [PATCH 3/6] refactor: split docs sourcemap upload into separate job using compiled binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16979b74f..565e89ece 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -687,30 +687,57 @@ jobs: run: | bun install --frozen-lockfile bun run build - - name: Upload sourcemaps to Sentry - if: github.event_name == 'push' && env.SENTRY_AUTH_TOKEN != '' - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: | - bun run --bun src/bin.ts sourcemap inject docs/dist/ - bun run --bun src/bin.ts sourcemap upload docs/dist/ \ - --release "${{ steps.version.outputs.version }}" \ - --url-prefix "~/" \ - sentry/cli-website - name: Package Docs run: | cp .nojekyll docs/dist/ cd docs/dist && zip -r ../../gh-pages.zip . - - name: Upload artifact + - name: Upload docs artifact uses: actions/upload-artifact@v7 with: name: gh-pages path: gh-pages.zip + upload-docs-sourcemaps: + name: Upload Docs Sourcemaps + needs: [build-binary, build-docs] + # Only on main/release pushes (not PRs) — requires SENTRY_AUTH_TOKEN. + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Get CLI version + id: version + run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT" + - name: Download compiled CLI binary + uses: actions/download-artifact@v8 + with: + name: sentry-linux-x64 + path: dist-bin + - name: Make binary executable + run: chmod +x dist-bin/sentry-linux-x64 + - name: Download docs artifact + uses: actions/download-artifact@v8 + with: + name: gh-pages + path: . + - name: Extract docs + run: | + mkdir -p docs-dist + cd docs-dist && unzip ../gh-pages.zip + - name: Inject debug IDs and upload sourcemaps + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + run: | + ./dist-bin/sentry-linux-x64 sourcemap inject docs-dist/ + ./dist-bin/sentry-linux-x64 sourcemap upload docs-dist/ \ + --release "${{ steps.version.outputs.version }}" \ + --url-prefix "~/" \ + sentry/cli-website + ci-status: name: CI Status if: always() - needs: [changes, check-generated, eval-skill, build-binary, build-npm, build-docs, test-e2e, generate-patches, publish-nightly] + needs: [changes, check-generated, eval-skill, build-binary, build-npm, build-docs, upload-docs-sourcemaps, test-e2e, generate-patches, publish-nightly] runs-on: ubuntu-latest permissions: {} steps: From 5c145cdd156e8de23ec81e372feab9cd433053c5 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 15:55:09 +0000 Subject: [PATCH 4/6] fix: inject debug IDs before packaging, fix upload command syntax - 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 --- .github/workflows/ci.yml | 67 +++++++++++++----------------- .github/workflows/docs-preview.yml | 8 ++-- 2 files changed, 33 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 565e89ece..ac8b766ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -662,7 +662,7 @@ jobs: build-docs: name: Build Docs - needs: [lint] + needs: [lint, build-binary] runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -677,6 +677,13 @@ jobs: - name: Get CLI version id: version run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT" + - name: Download compiled CLI binary + uses: actions/download-artifact@v8 + with: + name: sentry-linux-x64 + path: dist-bin + - name: Make binary executable + run: chmod +x dist-bin/sentry-linux-x64 - name: Generate docs content run: bun run generate:schema && bun run generate:docs - name: Build Docs @@ -687,6 +694,25 @@ jobs: run: | bun install --frozen-lockfile bun run build + # Inject debug IDs into the built JS files BEFORE packaging. + # This ensures deployed files have the //# debugId= comment and the + # _sentryDebugIds IIFE so runtime events carry debug_meta. + - name: Inject debug IDs + run: ./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/ + - name: Upload sourcemaps to Sentry + if: github.event_name == 'push' + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: sentry + SENTRY_PROJECT: cli-website + run: | + ./dist-bin/sentry-linux-x64 sourcemap upload docs/dist/ \ + --release "${{ steps.version.outputs.version }}" \ + --url-prefix "~/" + # Remove .map files — they were uploaded to Sentry but shouldn't + # be deployed to production. + - name: Remove sourcemaps from output + run: find docs/dist -name '*.map' -delete - name: Package Docs run: | cp .nojekyll docs/dist/ @@ -697,47 +723,10 @@ jobs: name: gh-pages path: gh-pages.zip - upload-docs-sourcemaps: - name: Upload Docs Sourcemaps - needs: [build-binary, build-docs] - # Only on main/release pushes (not PRs) — requires SENTRY_AUTH_TOKEN. - if: github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Get CLI version - id: version - run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT" - - name: Download compiled CLI binary - uses: actions/download-artifact@v8 - with: - name: sentry-linux-x64 - path: dist-bin - - name: Make binary executable - run: chmod +x dist-bin/sentry-linux-x64 - - name: Download docs artifact - uses: actions/download-artifact@v8 - with: - name: gh-pages - path: . - - name: Extract docs - run: | - mkdir -p docs-dist - cd docs-dist && unzip ../gh-pages.zip - - name: Inject debug IDs and upload sourcemaps - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: | - ./dist-bin/sentry-linux-x64 sourcemap inject docs-dist/ - ./dist-bin/sentry-linux-x64 sourcemap upload docs-dist/ \ - --release "${{ steps.version.outputs.version }}" \ - --url-prefix "~/" \ - sentry/cli-website - ci-status: name: CI Status if: always() - needs: [changes, check-generated, eval-skill, build-binary, build-npm, build-docs, upload-docs-sourcemaps, test-e2e, generate-patches, publish-nightly] + needs: [changes, check-generated, eval-skill, build-binary, build-npm, build-docs, test-e2e, generate-patches, publish-nightly] runs-on: ubuntu-latest permissions: {} steps: diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index c5de4dca1..dee8ce82b 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -49,16 +49,18 @@ jobs: bun install --frozen-lockfile bun run build + - name: Inject debug IDs + run: bun run --bun src/bin.ts sourcemap inject docs/dist/ - name: Upload sourcemaps to Sentry if: env.SENTRY_AUTH_TOKEN != '' env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: sentry + SENTRY_PROJECT: cli-website run: | - bun run --bun src/bin.ts sourcemap inject docs/dist/ bun run --bun src/bin.ts sourcemap upload docs/dist/ \ --release "${{ steps.version.outputs.version }}" \ - --url-prefix "~/" \ - sentry/cli-website + --url-prefix "~/" - name: Ensure .nojekyll at gh-pages root run: | From 4cde4becd2f4d7ae125563487e602ab676a17c1c Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 16:03:51 +0000 Subject: [PATCH 5/6] fix: gate inject+upload on SENTRY_AUTH_TOKEN (CLI requires auth) --- .github/workflows/ci.yml | 13 ++++++------- .github/workflows/docs-preview.yml | 5 ++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac8b766ab..2981a11a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -694,18 +694,17 @@ jobs: run: | bun install --frozen-lockfile bun run build - # Inject debug IDs into the built JS files BEFORE packaging. - # This ensures deployed files have the //# debugId= comment and the - # _sentryDebugIds IIFE so runtime events carry debug_meta. - - name: Inject debug IDs - run: ./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/ - - name: Upload sourcemaps to Sentry - if: github.event_name == 'push' + # Inject debug IDs and upload sourcemaps. The inject step adds + # //# debugId= and the _sentryDebugIds IIFE to deployed JS files. + # Both steps require SENTRY_AUTH_TOKEN (the CLI checks auth on startup). + - name: Inject debug IDs and upload sourcemaps + if: github.event_name == 'push' && env.SENTRY_AUTH_TOKEN != '' env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: sentry SENTRY_PROJECT: cli-website run: | + ./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/ ./dist-bin/sentry-linux-x64 sourcemap upload docs/dist/ \ --release "${{ steps.version.outputs.version }}" \ --url-prefix "~/" diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index dee8ce82b..3cca15ef0 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -49,15 +49,14 @@ jobs: bun install --frozen-lockfile bun run build - - name: Inject debug IDs - run: bun run --bun src/bin.ts sourcemap inject docs/dist/ - - name: Upload sourcemaps to Sentry + - name: Inject debug IDs and upload sourcemaps if: env.SENTRY_AUTH_TOKEN != '' env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: sentry SENTRY_PROJECT: cli-website run: | + bun run --bun src/bin.ts sourcemap inject docs/dist/ bun run --bun src/bin.ts sourcemap upload docs/dist/ \ --release "${{ steps.version.outputs.version }}" \ --url-prefix "~/" From 2cf3d4ac35b4467c0ff4318afa235cf2ec1eb008 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Thu, 9 Apr 2026 16:19:20 +0000 Subject: [PATCH 6/6] fix: set release in Sentry.init (v10 ignores build option), clean up .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 --- .github/workflows/ci.yml | 1 + .github/workflows/docs-preview.yml | 5 +++++ docs/astro.config.mjs | 8 ++++---- docs/sentry.client.config.js | 1 + docs/sentry.server.config.js | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2981a11a6..e7d85fe3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -691,6 +691,7 @@ jobs: env: PUBLIC_SENTRY_ENVIRONMENT: production SENTRY_RELEASE: ${{ steps.version.outputs.version }} + PUBLIC_SENTRY_RELEASE: ${{ steps.version.outputs.version }} run: | bun install --frozen-lockfile bun run build diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 3cca15ef0..e7e0d5f26 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -45,6 +45,7 @@ jobs: DOCS_BASE_PATH: /pr-preview/pr-${{ github.event.pull_request.number }} PUBLIC_SENTRY_ENVIRONMENT: staging SENTRY_RELEASE: ${{ steps.version.outputs.version }} + PUBLIC_SENTRY_RELEASE: ${{ steps.version.outputs.version }} run: | bun install --frozen-lockfile bun run build @@ -61,6 +62,10 @@ jobs: --release "${{ steps.version.outputs.version }}" \ --url-prefix "~/" + # Remove .map files — uploaded to Sentry but shouldn't be deployed. + - name: Remove sourcemaps from output + run: find docs/dist -name '*.map' -delete + - name: Ensure .nojekyll at gh-pages root run: | git config user.name "github-actions[bot]" diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index c4178658d..523b9b447 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -5,9 +5,6 @@ import { defineConfig } from "astro/config"; // Allow base path override via environment variable for PR previews const base = process.env.DOCS_BASE_PATH || "/"; -// Release name from CI (root package.json version). Undefined in local dev. -const release = process.env.SENTRY_RELEASE; - export default defineConfig({ site: "https://cli.sentry.dev", base, @@ -27,7 +24,10 @@ export default defineConfig({ project: "cli-website", org: "sentry", environment: process.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", - release: release ? { name: release } : undefined, + // Note: @sentry/astro v10 does not support the `release` build-time + // option (todo(v11) in the source). Release is set in Sentry.init() + // via PUBLIC_SENTRY_RELEASE / SENTRY_RELEASE env vars instead. + // // Disable the plugin's sourcemap upload — it pulls in @sentry/cli // (20+ MB binary download). We use our own CLI post-build instead // (see CI workflow: `sentry sourcemap inject` + `sentry sourcemap upload`). diff --git a/docs/sentry.client.config.js b/docs/sentry.client.config.js index 453aa4dea..48b259b4b 100644 --- a/docs/sentry.client.config.js +++ b/docs/sentry.client.config.js @@ -3,6 +3,7 @@ import * as Sentry from "@sentry/astro"; Sentry.init({ dsn: "https://2aca5fe97c71868bc3aa7fb48620dc39@o1.ingest.us.sentry.io/4510798755856384", environment: import.meta.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", + release: import.meta.env.PUBLIC_SENTRY_RELEASE || undefined, sendDefaultPii: true, integrations: [ Sentry.browserTracingIntegration(), diff --git a/docs/sentry.server.config.js b/docs/sentry.server.config.js index b399aedb6..1fc3dca01 100644 --- a/docs/sentry.server.config.js +++ b/docs/sentry.server.config.js @@ -3,6 +3,7 @@ import * as Sentry from "@sentry/astro"; Sentry.init({ dsn: "https://2aca5fe97c71868bc3aa7fb48620dc39@o1.ingest.us.sentry.io/4510798755856384", environment: process.env.PUBLIC_SENTRY_ENVIRONMENT ?? "development", + release: process.env.SENTRY_RELEASE || undefined, sendDefaultPii: true, enableLogs: true, tracesSampleRate: 1.0,