Skip to content

Commit

Permalink
added session start metrics to metricStore (#4557)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkobori authored Dec 8, 2023
1 parent 295405d commit ad3d9d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ export const signIn = async (includeBillingScope = false): Promise<OidcUser> =>
authStore.update((state) => ({ ...state, userJustSignedIn: true }));
const authTokenState: AuthTokenState = await loadAuthToken({ includeBillingScope, popUp: true });
if (authTokenState.status === 'success') {
const sessionId = uuid();
const sessionStartTime: number = Date.now();
authStore.update((state) => ({
...state,
hasGcpBillingScopeThroughB2C: includeBillingScope,
}));
const sessionId = uuid();
const sessionStartTime: number = Date.now();
metricStore.update((state) => ({
...state,
sessionId,
sessionStartTime,
}));
Expand Down

0 comments on commit ad3d9d2

Please sign in to comment.