fix(cleanup): TODO-011 — wire error boundary to telemetry trackEvent
This commit is contained in:
parent
5dafcc2118
commit
9e63418837
@ -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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user