fix(cleanup): TODO-011 — wire error boundary to telemetry trackEvent

This commit is contained in:
saravanakumardb1 2026-04-13 14:58:59 -07:00
parent 5dafcc2118
commit 9e63418837

View File

@ -2,6 +2,7 @@
import { useEffect } from 'react'; import { useEffect } from 'react';
import Link from 'next/link'; import Link from 'next/link';
import { trackEvent } from '../lib/telemetry';
export default function GlobalError({ export default function GlobalError({
error, error,
@ -11,11 +12,10 @@ export default function GlobalError({
reset: () => void; reset: () => void;
}) { }) {
useEffect(() => { useEffect(() => {
// TODO-011: Wire error boundary to telemetry trackEvent('error', 'app', 'error_boundary', {
// Priority: low | Phase: cleanup message: error.message,
// Import { trackEvent } from '../lib/telemetry' and send error details: tags: error.digest ? { digest: error.digest } : undefined,
// trackEvent('app.error_boundary', { message: error.message, digest: error.digest }) });
// Also consider sending to @bytelyst/diagnostics-client if available.
}, [error]); }, [error]);
return ( return (