feat(frontend): allow sentry disable in dev (#10858)

<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
Vercel is logging things it shouldnt

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Manually verified in vercel
This commit is contained in:
Nicholas Tindle
2025-09-05 22:29:39 +02:00
committed by GitHub
parent 00cbfb8f80
commit c03af5c196
3 changed files with 24 additions and 12 deletions

View File

@@ -5,10 +5,14 @@
import { BehaveAs, getBehaveAs, getEnvironmentStr } from "@/lib/utils";
import * as Sentry from "@sentry/nextjs";
const shouldEnable =
(process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development") &&
getBehaveAs() === BehaveAs.CLOUD;
const isProdOrDev =
process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development";
const isCloud = getBehaveAs() === BehaveAs.CLOUD;
const isDisabled = process.env.DISABLE_SENTRY === "true";
const shouldEnable = !isDisabled && isProdOrDev && isCloud;
Sentry.init({
dsn: "https://fe4e4aa4a283391808a5da396da20159@o4505260022104064.ingest.us.sentry.io/4507946746380288",

View File

@@ -6,10 +6,14 @@
import * as Sentry from "@sentry/nextjs";
import { BehaveAs, getBehaveAs, getEnvironmentStr } from "./src/lib/utils";
const shouldEnable =
(process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development") &&
getBehaveAs() === BehaveAs.CLOUD;
const isProdOrDev =
process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development";
const isCloud = getBehaveAs() === BehaveAs.CLOUD;
const isDisabled = process.env.DISABLE_SENTRY === "true";
const shouldEnable = !isDisabled && isProdOrDev && isCloud;
Sentry.init({
dsn: "https://fe4e4aa4a283391808a5da396da20159@o4505260022104064.ingest.us.sentry.io/4507946746380288",

View File

@@ -6,10 +6,14 @@ import { BehaveAs, getBehaveAs, getEnvironmentStr } from "@/lib/utils";
import * as Sentry from "@sentry/nextjs";
// import { NodeProfilingIntegration } from "@sentry/profiling-node";
const shouldEnable =
(process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development") &&
getBehaveAs() === BehaveAs.CLOUD;
const isProdOrDev =
process.env.NODE_ENV === "production" ||
process.env.NODE_ENV === "development";
const isCloud = getBehaveAs() === BehaveAs.CLOUD;
const isDisabled = process.env.DISABLE_SENTRY === "true";
const shouldEnable = !isDisabled && isProdOrDev && isCloud;
Sentry.init({
dsn: "https://fe4e4aa4a283391808a5da396da20159@o4505260022104064.ingest.us.sentry.io/4507946746380288",