mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): Remove Sentry Pop-up and add run options (#8138)
* modify sentry setup * Update sentry.client.config.ts * remove env vars from dev so it will work on windows still
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user