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 { 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 (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user