Extend request-phase telemetry spans to Search - #98577
Draft
TMisiukiewicz wants to merge 12 commits into
Draft
Conversation
…phase-telemetry # Conflicts: # src/libs/actions/OnyxDerived/index.ts
Contributor
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
This is a follow-up to and is stacked on #98413. That PR added four spans splitting the
OpenApp/ReconnectAppdata load intoStartupData.Wait/.Download/.Apply/.Render. The instrumentation itself is command-agnostic — the only thing making it startup-specific was theAPP_STARTUP_NETWORK_REQUEST.has(command)gate. This PR widens that gate to also coverREAD_COMMANDS.SEARCHand gives Search its own span family so the two don't share names or attempt counters.Merge order: this should not be merged before #98413. Once #98413 lands, this branch should be rebased onto
mainso the diff collapses to just the files above.Span table:
SearchData.Queuesearch()entry, beforewaitForWritesSearchData.Waitfetch()SearchData.Downloadresponse.json()resolvesSearchData.ApplySearchData.RenderKey design decisions:
attemptnumbers a startup span reports.request_id(the server'srequestID, available only once the body is parsed) lands on Download, Apply, andStartupData.RenderKnown limits:
SearchData.Queueis absent for searches usingskipWaitForWrites(home-screen sections, post-expense flow) — those never open one.SearchData.Waitcarries norequest_id; the ID arrives with the body. Reach it via the paired Download span.SearchData.Queue_${hash}_${offset}, reused across time. Safe only because the existing in-flight dedupe prevents two searches with the same key overlapping.ManualNavigateToReportsContentLoadonly covers the Reports tab tap (startNavigateToReportsSpans()has one caller,SearchTabButton.tsx:50) — pagination, in-page re-search, and view switches re-run the list render with no measurement otherwise. It measures JS-thread-busy time after apply, not time-to-content: a quiet gap of two or more frames mid-cascade closes it early, so read the duration as a floor andlongest_frame_msas the actionable number. Filter ontimed_out: false.Fixed Issues
$ #98442
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari