[Statsig] Add more events to downsample, increase downsample rate (#5198)

* add some events for sampling

* include downsample rate in metadata

* fix metadata logic

* uncomment debug
This commit is contained in:
Hailey
2024-09-07 04:13:51 -07:00
committed by GitHub
parent adef9cff10
commit c8be9b78c6
7 changed files with 47 additions and 37 deletions
+4 -5
View File
@@ -661,16 +661,15 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
linking={LINKING}
theme={theme}
onStateChange={() => {
logEvent('router:navigate:sampled', {
from: prevLoggedRouteName.current,
})
prevLoggedRouteName.current = getCurrentRouteName()
const routeName = getCurrentRouteName()
if (routeName === 'Notifications') {
logEvent('router:navigate:notifications:sampled', {})
}
}}
onReady={() => {
attachRouteToLogEvents(getCurrentRouteName)
logModuleInitTime()
onReady()
logEvent('router:navigate:sampled', {})
}}>
{children}
</NavigationContainer>