diff options
author | Hailey <me@haileyok.com> | 2024-09-07 04:13:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-07 13:13:51 +0200 |
commit | c8be9b78c6abb1ca98a2e4c9342e314b19d2cb7c (patch) | |
tree | 91b36de19a2e3def4fcb64aeec9cd2b8470ced78 /src/state/queries/profile.ts | |
parent | adef9cff10eb8cbd5227c1fde0f94068fb6987f6 (diff) | |
download | voidsky-c8be9b78c6abb1ca98a2e4c9342e314b19d2cb7c.tar.zst |
[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
Diffstat (limited to 'src/state/queries/profile.ts')
-rw-r--r-- | src/state/queries/profile.ts | 12 |
1 files changed, 6 insertions, 6 deletions
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<AppBskyActorDefs.ProfileViewDetailed>, - 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<AppBskyActorDefs.ProfileViewDetailed>, ) { 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<void, Error, {did: string; followUri: string}>({ mutationFn: async ({followUri}) => { - logEvent('profile:unfollow', {logContext}) + logEvent('profile:unfollow:sampled', {logContext}) track('Profile:Unfollow', {username: followUri}) return await agent.deleteFollow(followUri) }, |