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