mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
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:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user