[Sentry] Setup performance metrics for open Create Expense#75309
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@tylerkaraszewski Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| ) { | ||
| Performance.markStart(CONST.TIMING.OPEN_CREATE_EXPENSE); | ||
| startSpan(CONST.TELEMETRY.SPAN_OPEN_CREATE_EXPENSE, { | ||
| name: '/money-request-create', |
There was a problem hiding this comment.
NAB: Do we know the source route that is calling this? Might be beter as a description to the span.
There was a problem hiding this comment.
+1 This would be great to actually know where this is being called from, that might require extra param to the method though
There was a problem hiding this comment.
we will need to add the extra param everytime we call the startMoneyRequest OR just use this before starting the span:
const sourceRoute = Navigation.getActiveRoute(); and save it in the startSpan attribute
There was a problem hiding this comment.
Maybe if we don't set a span.name is gets automatically set to Navigation.getActiveRoute()?
There was a problem hiding this comment.
I added the sourceRoute in the span attributes, so it will be easier to filter by it
There was a problem hiding this comment.
I renamed and moved the attributes names to CONST, as we agreed
| ) { | ||
| Performance.markStart(CONST.TIMING.OPEN_CREATE_EXPENSE); | ||
| startSpan(CONST.TELEMETRY.SPAN_OPEN_CREATE_EXPENSE, { | ||
| name: '/money-request-create', |
There was a problem hiding this comment.
+1 This would be great to actually know where this is being called from, that might require extra param to the method though
| draftTransactions?: OnyxCollection<OnyxTypes.Transaction>, | ||
| ) { | ||
| Performance.markStart(CONST.TIMING.OPEN_CREATE_EXPENSE); | ||
| startSpan(CONST.TELEMETRY.SPAN_OPEN_CREATE_EXPENSE, { |
There was a problem hiding this comment.
Is this method also used for the native share menu?
There was a problem hiding this comment.
I don't think so, it is used for the normal in-app expense creation flow, not the share extension flow.
I think we can add it, will have to figure it out. Most likely adding the start span in SubmitDetailsPage.tsx before initMoneyRequest function
|
No product change, removing myself and unsubscribing |
|
oh actually @rinej there is a failing typecheck. |
|
looks like it was failing on main, so not related to our changes. This is the PR with the fix -> https://github.com/Expensify/App/pull/75539/files |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.2.62-0 🚀
|
|
Hi @rinej Can you please share steps for QA team? |
|
I will QA this, should have been internal. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.62-5 🚀
|

Explanation of Change
PR introduces Manual metric to measure opening create expense modal send it to Sentry.
Start:
startMoneyRequest() in IOU.ts - when user taps FAB/quick action to create expense
End:
Multiple locations to cover all flow paths:
IOURequestStartPage.tsx - normal manual/scan flow
DistanceRequestStartPage.tsx - distance flow
IOURequestStepParticipants.tsx - when scan flow skips start page
IOURequestStepConfirmation.tsx - when scan flow goes direct to confirmation
Only the first one actually ends the span.
Measures time from "create expense initiated" to "form displayed" - it matches the existing Performance timing behavior.
Fixed Issues
$ #74135
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screen.Recording.2025-11-19.at.12.04.15.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop