From e063bef2af55b3e609c974593e74466845d8d087 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Thu, 8 Feb 2024 13:30:18 -0800 Subject: [PATCH 1/2] Sentry: temp disable production check This won't work the same way once this code is in a private repo. Let's disable this while we move this code instead of trying to re-solve this problem beforehand. --- frontend/sentry.client.config.ts | 3 +++ frontend/sentry.edge.config.ts | 3 +++ frontend/sentry.server.config.ts | 3 +++ 3 files changed, 9 insertions(+) diff --git a/frontend/sentry.client.config.ts b/frontend/sentry.client.config.ts index b7e7575f..ddcba2e4 100644 --- a/frontend/sentry.client.config.ts +++ b/frontend/sentry.client.config.ts @@ -14,8 +14,11 @@ const sampleRate = SENTRY_SAMPLING_ENABLED Sentry.init({ async beforeSend(event) { try { + /* + * Temporarily disable while we move to a new repo const current_production = await isCurrentProductionDeployment(); event.tags = { ...event.tags, current_production }; + */ } catch (e) { event.tags = { ...event.tags, before_send_error: true }; event.extra = { diff --git a/frontend/sentry.edge.config.ts b/frontend/sentry.edge.config.ts index fab1230e..86d50449 100644 --- a/frontend/sentry.edge.config.ts +++ b/frontend/sentry.edge.config.ts @@ -13,8 +13,11 @@ const sampleRate = SENTRY_SAMPLING_ENABLED Sentry.init({ async beforeSend(event) { try { + /* + * Temporarily disable while we move to a new repo const current_production = await isCurrentProductionDeployment(); event.tags = { ...event.tags, current_production }; + */ } catch (e) { event.tags = { ...event.tags, before_send_error: true }; event.extra = { diff --git a/frontend/sentry.server.config.ts b/frontend/sentry.server.config.ts index d7854010..e01a9d0e 100644 --- a/frontend/sentry.server.config.ts +++ b/frontend/sentry.server.config.ts @@ -33,8 +33,11 @@ Sentry.init({ } } try { + /* + * Temporarily disable while we move to a new repo const current_production = await isCurrentProductionDeployment(); event.tags = { ...event.tags, current_production }; + */ } catch (e) { event.tags = { ...event.tags, before_send_error: true }; event.extra = { From 02ac56c179fda6d01336e5c0e23433868e18d428 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Thu, 8 Feb 2024 13:45:44 -0800 Subject: [PATCH 2/2] Sentry: drop unused import --- frontend/sentry.client.config.ts | 2 +- frontend/sentry.edge.config.ts | 2 +- frontend/sentry.server.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/sentry.client.config.ts b/frontend/sentry.client.config.ts index ddcba2e4..e158d704 100644 --- a/frontend/sentry.client.config.ts +++ b/frontend/sentry.client.config.ts @@ -1,5 +1,5 @@ import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env'; -import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; +// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; import { SentryErrorIntegration } from '@ifixit/sentry'; import { BrowserTracing } from '@sentry/browser'; import * as Sentry from '@sentry/nextjs'; diff --git a/frontend/sentry.edge.config.ts b/frontend/sentry.edge.config.ts index 86d50449..a566018a 100644 --- a/frontend/sentry.edge.config.ts +++ b/frontend/sentry.edge.config.ts @@ -1,6 +1,6 @@ import { SentryErrorIntegration } from './../packages/sentry/index'; import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env'; -import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; +// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; import * as Sentry from '@sentry/nextjs'; const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; diff --git a/frontend/sentry.server.config.ts b/frontend/sentry.server.config.ts index e01a9d0e..fb9f8db6 100644 --- a/frontend/sentry.server.config.ts +++ b/frontend/sentry.server.config.ts @@ -1,5 +1,5 @@ import { SENTRY_SAMPLING_ENABLED, VERCEL_ENV } from '@config/env'; -import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; +// import { isCurrentProductionDeployment } from '@helpers/vercel-helpers'; import { SentryErrorIntegration } from '@ifixit/sentry'; import * as Sentry from '@sentry/nextjs';