mirror of https://github.com/kortix-ai/suna.git
chore(frontend): remove Sentry integration and related configurations
This commit is contained in:
parent
390ebda206
commit
78ebe1e21f
|
@ -1,7 +1,6 @@
|
|||
import { withSentryConfig } from '@sentry/nextjs';
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
let nextConfig: NextConfig = {
|
||||
const nextConfig: NextConfig = {
|
||||
webpack: (config) => {
|
||||
// This rule prevents issues with pdf.js and canvas
|
||||
config.externals = [...(config.externals || []), { canvas: 'canvas' }];
|
||||
|
@ -14,19 +13,7 @@ let nextConfig: NextConfig = {
|
|||
|
||||
return config;
|
||||
},
|
||||
productionBrowserSourceMaps: true,
|
||||
};
|
||||
|
||||
/** Removing Sentry for now */
|
||||
if (false && process.env.NEXT_PUBLIC_VERCEL_ENV === 'production') {
|
||||
nextConfig = withSentryConfig(nextConfig, {
|
||||
org: 'kortix-ai',
|
||||
project: 'suna-nextjs',
|
||||
silent: !process.env.CI,
|
||||
widenClientFileUpload: true,
|
||||
tunnelRoute: '/monitoring',
|
||||
disableLogger: true,
|
||||
automaticVercelMonitors: true,
|
||||
});
|
||||
}
|
||||
|
||||
export default nextConfig;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -37,7 +37,6 @@
|
|||
"@radix-ui/react-tabs": "^1.1.8",
|
||||
"@radix-ui/react-tooltip": "^1.2.3",
|
||||
"@react-pdf/renderer": "^4.3.0",
|
||||
"@sentry/nextjs": "^9.22.0",
|
||||
"@silevis/reactgrid": "^4.1.17",
|
||||
"@supabase/ssr": "latest",
|
||||
"@supabase/supabase-js": "latest",
|
||||
|
|
|
@ -13,7 +13,6 @@ import { checkApiHealth } from '@/lib/api';
|
|||
import { MaintenancePage } from '@/components/maintenance/maintenance-page';
|
||||
import { DeleteOperationProvider } from '@/contexts/DeleteOperationContext';
|
||||
import { StatusOverlay } from '@/components/ui/status-overlay';
|
||||
import { VSentry } from '@/components/sentry';
|
||||
import type { IMaintenanceNotice } from '@/lib/edge-flags';
|
||||
import { MaintenanceNotice } from './maintenance-notice';
|
||||
import { MaintenanceBanner } from './maintenance-banner';
|
||||
|
@ -134,7 +133,6 @@ export default function DashboardLayoutContent({
|
|||
onOpenChange={setShowMaintenanceAlert}
|
||||
closeable={true}
|
||||
/>
|
||||
<VSentry />
|
||||
|
||||
{/* Status overlay for deletion operations */}
|
||||
<StatusOverlay />
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
'use client';
|
||||
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
import NextError from 'next/error';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
|
@ -10,7 +9,7 @@ export default function GlobalError({
|
|||
error: Error & { digest?: string };
|
||||
}) {
|
||||
useEffect(() => {
|
||||
Sentry.captureException(error);
|
||||
console.error(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
import { useAuth } from '../AuthProvider';
|
||||
|
||||
export const VSentry: React.FC = () => {
|
||||
const { user } = useAuth();
|
||||
useEffect(() => {
|
||||
if (!document) return;
|
||||
const scope = Sentry.getCurrentScope();
|
||||
if (!user) scope.setUser(null);
|
||||
else scope.setUser({ email: user.email, id: user.id });
|
||||
}, [user]);
|
||||
|
||||
return null;
|
||||
};
|
|
@ -1,6 +0,0 @@
|
|||
import * as Sentry from '@sentry/nextjs';
|
||||
import { SentryConfig } from './sentry.config';
|
||||
|
||||
Sentry.init(SentryConfig);
|
||||
|
||||
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
|
|
@ -1,8 +0,0 @@
|
|||
import * as Sentry from '@sentry/nextjs';
|
||||
import { SentryConfig } from './sentry.config';
|
||||
|
||||
export async function register() {
|
||||
Sentry.init(SentryConfig);
|
||||
}
|
||||
|
||||
export const onRequestError = Sentry.captureRequestError;
|
|
@ -1,11 +0,0 @@
|
|||
import { consoleLoggingIntegration, type init } from '@sentry/nextjs';
|
||||
|
||||
type SentryConfig = Parameters<typeof init>[0];
|
||||
|
||||
export const SentryConfig: SentryConfig = {
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
tracesSampleRate: 0.1,
|
||||
debug: false,
|
||||
_experiments: { enableLogs: true },
|
||||
integrations: [consoleLoggingIntegration()],
|
||||
};
|
Loading…
Reference in New Issue