mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-07 22:33:57 -05:00
Added Sentry captureConsoleIntegration and extraErrorDataIntegration to client, edge, and server configs. Improved replay integration with unmasking support. Updated TallyPopup to collect and expose Sentry replay data, user agent, and page URL for enhanced telemetry and debugging. Improved event handling and error logging for Tally events. Marked CustomNode title for Sentry unmasking.<!-- Clearly explain the need for these changes: --> ### Changes 🏗️ Reconfigure sentry Pass the id with sentry replay to tally alongside prefilling email, and passing non user identifying attributes like platform url, full url, and is authenticated. <!-- Concisely describe all of the changes made in this pull request: --> ### 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] Test the results show up in sentry - [x] Test the url works in tally
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
// This file configures the initialization of Sentry on the server.
|
|
// The config you add here will be used whenever the server handles a request.
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
|
|
|
import {
|
|
AppEnv,
|
|
BehaveAs,
|
|
getAppEnv,
|
|
getBehaveAs,
|
|
getEnvironmentStr,
|
|
} from "@/lib/utils";
|
|
import * as Sentry from "@sentry/nextjs";
|
|
// import { NodeProfilingIntegration } from "@sentry/profiling-node";
|
|
|
|
const isProdOrDev = [AppEnv.PROD, AppEnv.DEV].includes(getAppEnv());
|
|
|
|
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",
|
|
|
|
environment: getEnvironmentStr(),
|
|
|
|
enabled: shouldEnable,
|
|
|
|
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
|
tracesSampleRate: 1,
|
|
tracePropagationTargets: [
|
|
"localhost",
|
|
"localhost:8006",
|
|
/^https:\/\/dev\-builder\.agpt\.co\/api/,
|
|
/^https:\/\/.*\.agpt\.co\/api/,
|
|
],
|
|
|
|
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
debug: false,
|
|
|
|
// Integrations
|
|
integrations: [
|
|
Sentry.anrIntegration(),
|
|
// NodeProfilingIntegration,
|
|
Sentry.extraErrorDataIntegration(),
|
|
// Sentry.fsIntegration(),
|
|
],
|
|
|
|
enableLogs: true,
|
|
});
|