Introduce error boundary mechanism and exception capture with Baselime and Sentry
Deleted the ErrorBoundary component from the makerkit package and introduced new exception capture mechanisms for Baselime and Sentry monitoring providers. The code now captures all exceptions thrown within components and sends them to the configured monitoring provider, which in turn logs the errors for debugging purposes. Updated packages and environment variables accordingly to support this feature.
This commit is contained in:
22
packages/monitoring/baselime/src/components/provider.tsx
Normal file
22
packages/monitoring/baselime/src/components/provider.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { BaselimeRum } from '@baselime/react-rum';
|
||||
|
||||
export function BaselineProvider({
|
||||
children,
|
||||
apiKey,
|
||||
enableWebVitals,
|
||||
ErrorPage,
|
||||
}: React.PropsWithChildren<{
|
||||
apiKey: string;
|
||||
enableWebVitals?: boolean;
|
||||
ErrorPage?: React.ReactElement;
|
||||
}>) {
|
||||
return (
|
||||
<BaselimeRum
|
||||
apiKey={apiKey}
|
||||
enableWebVitals={enableWebVitals}
|
||||
fallback={ErrorPage ?? null}
|
||||
>
|
||||
{children}
|
||||
</BaselimeRum>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user