Update useBaselime hook and upgrade dependencies
Add a captureEvent function to the useBaselime hook for capturing events within the monitoring service. Multiple dependencies, including `@supabase/supabase-js` and `next`, have also been updated to newer versions. This ensures usage of the most recent and efficient versions of the tools needed in our project to resolve potential issues and benefit from recent improvements.
This commit is contained in:
@@ -9,7 +9,7 @@ import { MonitoringService } from '@kit/monitoring-core';
|
||||
* @description Get the Baselime monitoring service for the browser.
|
||||
*/
|
||||
export function useBaselime(): MonitoringService {
|
||||
const { captureException, setUser } = useBaselimeRum();
|
||||
const { captureException, setUser, sendEvent } = useBaselimeRum();
|
||||
|
||||
return useMemo(() => {
|
||||
return {
|
||||
@@ -19,6 +19,9 @@ export function useBaselime(): MonitoringService {
|
||||
identifyUser(params) {
|
||||
setUser(params.id);
|
||||
},
|
||||
captureEvent<Extra extends object>(event: string, extra?: Extra) {
|
||||
return sendEvent(event, extra);
|
||||
},
|
||||
} satisfies MonitoringService;
|
||||
}, [captureException, setUser]);
|
||||
}, [captureException, sendEvent, setUser]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user