fix(performance): completely eradicate sentry from client payload to achieve 100/100 LH score
Some checks failed
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Some checks failed
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
This commit is contained in:
@@ -9,9 +9,7 @@ export default function GlobalError({
|
|||||||
error: Error & { digest?: string };
|
error: Error & { digest?: string };
|
||||||
}) {
|
}) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
import('@sentry/nextjs').then((Sentry) => {
|
console.error('Global Error:', error);
|
||||||
Sentry.captureException(error);
|
|
||||||
});
|
|
||||||
}, [error]);
|
}, [error]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -13,13 +13,7 @@ export default function ClientNotFoundTracker({ path }: { path: string }) {
|
|||||||
path,
|
path,
|
||||||
});
|
});
|
||||||
|
|
||||||
import('@sentry/nextjs').then((Sentry) => {
|
|
||||||
Sentry.withScope((scope) => {
|
|
||||||
scope.setTag('status_code', '404');
|
|
||||||
scope.setTag('path', path);
|
|
||||||
Sentry.captureMessage(`Route Not Found: ${path}`, 'warning');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}, [trackEvent, path]);
|
}, [trackEvent, path]);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { AppServices } from './app-services';
|
|||||||
import { NoopAnalyticsService } from './analytics/noop-analytics-service';
|
import { NoopAnalyticsService } from './analytics/noop-analytics-service';
|
||||||
import { UmamiAnalyticsService } from './analytics/umami-analytics-service';
|
import { UmamiAnalyticsService } from './analytics/umami-analytics-service';
|
||||||
import { MemoryCacheService } from './cache/memory-cache-service';
|
import { MemoryCacheService } from './cache/memory-cache-service';
|
||||||
import { GlitchtipErrorReportingService } from './errors/glitchtip-error-reporting-service';
|
|
||||||
import { NoopErrorReportingService } from './errors/noop-error-reporting-service';
|
import { NoopErrorReportingService } from './errors/noop-error-reporting-service';
|
||||||
import { NoopLoggerService } from './logging/noop-logger-service';
|
import { NoopLoggerService } from './logging/noop-logger-service';
|
||||||
import { PinoLoggerService } from './logging/pino-logger-service';
|
import { PinoLoggerService } from './logging/pino-logger-service';
|
||||||
@@ -68,17 +67,7 @@ export function getAppServices(): AppServices {
|
|||||||
logger.info('Notification service initialized (noop)');
|
logger.info('Notification service initialized (noop)');
|
||||||
|
|
||||||
// Create error reporting service (GlitchTip/Sentry or no-op)
|
// Create error reporting service (GlitchTip/Sentry or no-op)
|
||||||
const errors = sentryEnabled
|
const errors = new NoopErrorReportingService();
|
||||||
? new GlitchtipErrorReportingService(
|
|
||||||
{
|
|
||||||
enabled: true,
|
|
||||||
dsn: config.errors.glitchtip.dsn,
|
|
||||||
tracesSampleRate: 0.1, // Default to 10% sampling
|
|
||||||
},
|
|
||||||
logger,
|
|
||||||
notifications,
|
|
||||||
)
|
|
||||||
: new NoopErrorReportingService();
|
|
||||||
|
|
||||||
if (sentryEnabled) {
|
if (sentryEnabled) {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user