From c8be9b78c6abb1ca98a2e4c9342e314b19d2cb7c Mon Sep 17 00:00:00 2001 From: Hailey Date: Sat, 7 Sep 2024 04:13:51 -0700 Subject: [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 --- src/state/queries/profile.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/state/queries/profile.ts') diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index 6682cf3c8..532b005cf 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -219,8 +219,8 @@ export function useProfileUpdateMutation() { export function useProfileFollowMutationQueue( profile: Shadow, - logContext: LogEvents['profile:follow']['logContext'] & - LogEvents['profile:unfollow']['logContext'], + logContext: LogEvents['profile:follow:sampled']['logContext'] & + LogEvents['profile:follow:sampled']['logContext'], ) { const agent = useAgent() const queryClient = useQueryClient() @@ -291,7 +291,7 @@ export function useProfileFollowMutationQueue( } function useProfileFollowMutation( - logContext: LogEvents['profile:follow']['logContext'], + logContext: LogEvents['profile:follow:sampled']['logContext'], profile: Shadow, ) { const {currentAccount} = useSession() @@ -306,7 +306,7 @@ function useProfileFollowMutation( ownProfile = findProfileQueryData(queryClient, currentAccount.did) } captureAction(ProgressGuideAction.Follow) - logEvent('profile:follow', { + logEvent('profile:follow:sampled', { logContext, didBecomeMutual: profile.viewer ? Boolean(profile.viewer.followedBy) @@ -323,12 +323,12 @@ function useProfileFollowMutation( } function useProfileUnfollowMutation( - logContext: LogEvents['profile:unfollow']['logContext'], + logContext: LogEvents['profile:unfollow:sampled']['logContext'], ) { const agent = useAgent() return useMutation({ mutationFn: async ({followUri}) => { - logEvent('profile:unfollow', {logContext}) + logEvent('profile:unfollow:sampled', {logContext}) track('Profile:Unfollow', {username: followUri}) return await agent.deleteFollow(followUri) }, -- cgit 1.4.1