Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,7 @@ const CONST = {
SPAN_ON_LAYOUT_SKELETON_REPORTS: 'ManualOnLayoutSkeletonReports',
SPAN_NAVIGATE_TO_INBOX_TAB: 'ManualNavigateToInboxTab',
SPAN_OD_ND_TRANSITION: 'ManualOdNdTransition',
SPAN_OD_ND_TRANSITION_LOGGED_OUT: 'ManualOdNdTransitionLoggedOut',
SPAN_OPEN_SEARCH_ROUTER: 'ManualOpenSearchRouter',
SPAN_OPEN_CREATE_EXPENSE: 'ManualOpenCreateExpense',
SPAN_SEND_MESSAGE: 'ManualSendMessage',
Expand Down
1 change: 1 addition & 0 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function Expensify() {

const onSplashHide = useCallback(() => {
setSplashScreenState(CONST.BOOT_SPLASH_STATE.HIDDEN);
endSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION);
Comment on lines 247 to +249

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge End OD→ND span even when splash skips hide callback

When the hybrid app transition comes from a logged-out OldDot state, HybridAppHandler sets splashScreenState directly to HIDDEN (loggedOutFromOldDot ? HIDDEN : READY_TO_BE_HIDDEN), which means shouldHideSplash never renders SplashScreenHider, so onSplashHide doesn’t fire. With this change, endSpan(SPAN_OD_ND_TRANSITION) only runs inside onSplashHide, so the OD→ND span can remain open indefinitely for that flow, skewing telemetry. Consider ending the span at the transition completion regardless of whether the splash hide callback runs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so this would be: User in Expensify Classic signs out, we switch to NewDot because we always use NewDot as the authentication page starting point.

Makes sense I think to resolve this, though it is an uncommon flow. @kubabutkiewicz would the simplest solution would be to have an additional endSpan in HybridAppHandler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was also thinking about that to add the additional span here, will do that

endSpan(CONST.TELEMETRY.SPAN_APP_STARTUP);
endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.ROOT);
endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.SPLASH_HIDER);
Expand Down
17 changes: 13 additions & 4 deletions src/HybridAppHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ function HybridAppHandler() {
return;
}

endSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION);

setSplashScreenState(loggedOutFromOldDot ? CONST.BOOT_SPLASH_STATE.HIDDEN : CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN);
if (loggedOutFromOldDot) {
setSplashScreenState(CONST.BOOT_SPLASH_STATE.HIDDEN);
endSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT);
} else {
setSplashScreenState(CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN);
}
});
},
[setSplashScreenState, splashScreenState, tryNewDot],
Expand All @@ -46,7 +49,13 @@ function HybridAppHandler() {
return;
}

if (hybridAppSettings.hybridApp.pressedTryNewExpensify) {
if (hybridAppSettings.hybridApp.loggedOutFromOldDot) {
startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT, {
name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
startTime: hybridAppSettings.hybridApp.transitionStartTimestamp,
});
} else if (hybridAppSettings.hybridApp.pressedTryNewExpensify) {
startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION, {
name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
Expand Down
Loading