Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(frontend): Remove Sentry Pop-up and add run options (#8138)

Swifty00b8d219f2d8
diff --git a/autogpt_platform/frontend/package.json b/autogpt_platform/frontend/package.json
index 5f9b5cad68..d37c0977b9 100644
--- a/autogpt_platform/frontend/package.json
+++ b/autogpt_platform/frontend/package.json
@@ -3,7 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "dev": "export NODE_ENV=development && next dev",
+ "dev": "next dev",
+ "dev:nosentry": "export NODE_ENV=development && export DISABLE_SENTRY=true && next dev",
"dev:test": "export NODE_ENV=test && next dev",
"build": "next build",
"start": "next start",
diff --git a/autogpt_platform/frontend/sentry.client.config.ts b/autogpt_platform/frontend/sentry.client.config.ts
index f37d5cda23..bbfe73ea51 100644
--- a/autogpt_platform/frontend/sentry.client.config.ts
+++ b/autogpt_platform/frontend/sentry.client.config.ts
@@ -7,7 +7,7 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "https://fe4e4aa4a283391808a5da396da20159@o4505260022104064.ingest.us.sentry.io/4507946746380288",
- enabled: process.env.NODE_ENV !== "development",
+ enabled: process.env.DISABLE_SENTRY !== "true",
// Add optional integrations for additional features
integrations: [
@@ -31,14 +31,6 @@ Sentry.init({
/^https:\/\/dev\-builder\.agpt\.co\/api/,
],
- beforeSend(event, hint) {
- // Check if it is an exception, and if so, show the report dialog
- if (event.exception && event.event_id) {
- Sentry.showReportDialog({ eventId: event.event_id });
- }
- return event;
- },
-
// Define how likely Replay events are sampled.
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production