From 96f4f6359add6a4f2a37df8f17cf3f2f59f0a2a6 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 28 Feb 2025 17:13:49 -0600 Subject: Logger metrics (#7867) * Adjust datalake abstraction (cherry picked from commit 8ba6a8d45b1bd5698afbd06d9e858a91789f0ea6) * Just be really really specific (cherry picked from commit 920198959659329a7f7f7282a1293aaad198d8e3) * Add metric method to logger, replace datalake calls with new method (cherry picked from commit 7a026bbeae75514b64f928d7ff59707c518fd5e5) * Clarify types (cherry picked from commit 422b150deb158a70ef37e8a456d91bf26cd0b1bc) --- src/Navigation.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Navigation.tsx') diff --git a/src/Navigation.tsx b/src/Navigation.tsx index cf09406a6..baf99f110 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -32,6 +32,7 @@ import { import {RouteParams, State} from '#/lib/routes/types' import {attachRouteToLogEvents, logEvent} from '#/lib/statsig/statsig' import {bskyTitle} from '#/lib/strings/headings' +import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' import {useModalControls} from '#/state/modals' import {useUnreadNotifications} from '#/state/queries/notifications/unread' @@ -729,7 +730,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) { linking={LINKING} theme={theme} onStateChange={() => { - logEvent('lake:router:navigate', { + logger.metric('router:navigate', { from: prevLoggedRouteName.current, }) prevLoggedRouteName.current = getCurrentRouteName() @@ -738,7 +739,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) { attachRouteToLogEvents(getCurrentRouteName) logModuleInitTime() onReady() - logEvent('lake:router:navigate', {}) + logger.metric('router:navigate', {}) }}> {children} -- cgit 1.4.1