about summary refs log tree commit diff
path: root/src/Navigation.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-02-28 17:13:49 -0600
committerGitHub <noreply@github.com>2025-02-28 17:13:49 -0600
commit96f4f6359add6a4f2a37df8f17cf3f2f59f0a2a6 (patch)
treeafabc0fe9628a66f1db69f9e07b824db725aa6e1 /src/Navigation.tsx
parent9e59a2eef2f82511a9a9a056dbdb0c62fe2f61c6 (diff)
downloadvoidsky-96f4f6359add6a4f2a37df8f17cf3f2f59f0a2a6.tar.zst
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)
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r--src/Navigation.tsx5
1 files changed, 3 insertions, 2 deletions
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}
     </NavigationContainer>