Refactor monitoring package and improve error handling
The monitoring package has been significantly refactored to improve the granularity of error capture. Code from the 'capture-exception.ts' files in different locations have been deleted and replaced by a more unified approach in the 'use-baselime.ts' and 'use-sentry.ts' hooks. The README documentation has also been updated to reflect these changes and provide additional information about error monitoring setup and usage.
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { captureException } from '../capture-exception';
|
||||
import { useMonitoring } from './use-monitoring';
|
||||
|
||||
export function useCaptureException(error: Error) {
|
||||
useEffect(() => {
|
||||
void captureException(error);
|
||||
}, [error]);
|
||||
const service = useMonitoring();
|
||||
|
||||
return null;
|
||||
return service.captureException(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user