chore: remove Sentry.io entirely
We no longer use Sentry. Removed: - @sentry/react + @sentry/vite-plugin (package.json + lockfile) - Sentry.init in index.tsx and the VITE_SENTRY_DSN env (.env.production) - @sentry/vite-plugin + the SENTRY_AUTH_TOKEN sourcemap-upload path in vite.config.js (sourcemap now always false) and the CI env var - Sentry.ErrorBoundary in App.tsx -> react-error-boundary's ErrorBoundary with a folds-native fallback (Box/Text/Button + config tokens), which also resolves the native-cinny audit's raw-#hex/#5865f2 fallback finding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/* eslint-disable import/first */
|
||||
import * as Sentry from '@sentry/react';
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { enableMapSet } from 'immer';
|
||||
@@ -7,31 +6,6 @@ import '@fontsource-variable/inter/index.css';
|
||||
import 'folds/dist/style.css';
|
||||
import { configClass, varsClass } from 'folds';
|
||||
|
||||
const sentryDsn = import.meta.env.VITE_SENTRY_DSN;
|
||||
if (sentryDsn) {
|
||||
Sentry.init({
|
||||
dsn: sentryDsn,
|
||||
environment: import.meta.env.MODE,
|
||||
release: import.meta.env.VITE_APP_VERSION,
|
||||
// browserTracingIntegration omitted — it injects sentry-trace/baggage headers
|
||||
// into outgoing fetch calls, which breaks Synapse CORS on matrix.lotusguild.org
|
||||
// No propagation targets — we don't control the Matrix server's CORS allow-list
|
||||
tracePropagationTargets: [],
|
||||
tracesSampleRate: 0,
|
||||
// Don't send PII (IPs, usernames) — this is a private chat app
|
||||
sendDefaultPii: false,
|
||||
// Forward Sentry logs to the dashboard
|
||||
enableLogs: true,
|
||||
// Suppress benign PostmessageTransport / matrixRTC heartbeat timeouts (upstream library noise)
|
||||
ignoreErrors: ['Request timed out'],
|
||||
beforeSend(event) {
|
||||
// Drop any event that may have leaked an access token into breadcrumbs/data
|
||||
if (JSON.stringify(event).includes('access_token')) return null;
|
||||
return event;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
enableMapSet();
|
||||
|
||||
import './index.css';
|
||||
|
||||
Reference in New Issue
Block a user