From 0ab817767e47bd0f3d96b0aa5b8d30968d7be0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Tue, 7 Jan 2025 15:50:32 +0100 Subject: [PATCH] Set Sentry release --- .changeset/modern-walls-argue.md | 5 +++++ .github/workflows/ci.yaml | 1 + packages/gitbook/sentry.client.config.ts | 1 + packages/gitbook/sentry.edge.config.ts | 1 + packages/gitbook/sentry.server.config.ts | 1 + 5 files changed, 9 insertions(+) create mode 100644 .changeset/modern-walls-argue.md diff --git a/.changeset/modern-walls-argue.md b/.changeset/modern-walls-argue.md new file mode 100644 index 000000000..e65267505 --- /dev/null +++ b/.changeset/modern-walls-argue.md @@ -0,0 +1,5 @@ +--- +'gitbook': patch +--- + +Set Sentry release diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0387c2c47..1a84f872f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,6 +44,7 @@ jobs: SENTRY_ORG: ${{ vars.SENTRY_ORG }} SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} SENTRY_DSN: ${{ vars.SENTRY_DSN }} + SENTRY_RELEASE: ${{ github.sha }} - id: deploy name: Deploy to Cloudflare uses: cloudflare/wrangler-action@v3.11.0 diff --git a/packages/gitbook/sentry.client.config.ts b/packages/gitbook/sentry.client.config.ts index d2390ed28..ec2d1a16b 100644 --- a/packages/gitbook/sentry.client.config.ts +++ b/packages/gitbook/sentry.client.config.ts @@ -21,6 +21,7 @@ if (dsn) { const client = new BrowserClient({ debug: false, dsn, + release: process.env.SENTRY_RELEASE, integrations: [ dedupeIntegration(), functionToStringIntegration(), diff --git a/packages/gitbook/sentry.edge.config.ts b/packages/gitbook/sentry.edge.config.ts index 16a57e884..b499d1289 100644 --- a/packages/gitbook/sentry.edge.config.ts +++ b/packages/gitbook/sentry.edge.config.ts @@ -5,6 +5,7 @@ if (dsn) { init({ debug: false, dsn, + release: process.env.SENTRY_RELEASE, sampleRate: 0.1, diff --git a/packages/gitbook/sentry.server.config.ts b/packages/gitbook/sentry.server.config.ts index 16a57e884..b499d1289 100644 --- a/packages/gitbook/sentry.server.config.ts +++ b/packages/gitbook/sentry.server.config.ts @@ -5,6 +5,7 @@ if (dsn) { init({ debug: false, dsn, + release: process.env.SENTRY_RELEASE, sampleRate: 0.1,