Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing #43649

Closed
muttmuure opened this issue Jun 13, 2024 · 21 comments
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Task Weekly KSv2

Comments

@muttmuure
Copy link
Contributor

muttmuure commented Jun 13, 2024

Problem

Without symbols in our profile traces we can only guess which functions took so much time, based on the bottom-up stack (and try to manually map the amount of loops & internals to what we have in code).

Solution

Properly symbolicate the data in the performance profile feature into human-readable function names, line numbers, and file names so our team can identify the cause of slows in app.

Issue OwnerCurrent Issue Owner: @greg-schroeder
@muttmuure muttmuure converted this from a draft issue Jun 13, 2024
@muttmuure muttmuure added the AutoAssignerNewDotQuality Used to assign quality issues to engineers label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

Triggered auto assignment to @grgia (AutoAssignerNewDotQuality)

@melvin-bot melvin-bot bot added the Weekly KSv2 label Jun 13, 2024
@muttmuure muttmuure added the Task label Jun 13, 2024
@muttmuure
Copy link
Contributor Author

@grgia I think this is likely one that an agency contributor will need to take the lead on.

@Szymon20000 @adhorodyski can you give us a path forward on achieving symbolication in our current profile tracing?

@adhorodyski
Copy link
Contributor

adhorodyski commented Jun 13, 2024

@Szymon20000 as far as I remember the ones we used to receive with different bug reports were already symbolicated correctly.

Do you think anything could have changed in this regard lately for the react-native-release-profiler?

Here's one from 1 day ago that I couldn't symbolicate myself against latest main (same on @hurali97's end). We don't know (yet) the git tag for the build so it's not possible to match it against a source map file manually either.
Profile_trace_for_1.4.81-9.cpuprofile

And that's the same one after matching it against this branch:
image

@hannojg
Copy link
Contributor

hannojg commented Jun 17, 2024

Hey, Hanno from Margelo here. I will look into checking why we have no source maps using rn-release-profiler in expensify. Feel free to assign to me! 😊

@hannojg
Copy link
Contributor

hannojg commented Jun 17, 2024

The traces we record on the device are unsymbolicated. We need a way to symbolicate them. The flow would be:

  1. A user shares a profile trace
  2. A developer receives the trace
  3. The developer runs a script to symbolicate it

We already have a script for symbolication in place. The issue however is that the profile the user created is specific to an app version. And the script only symbolicates for the current commit we are on.
Additionally, switching versions as developer just to symbolicate the trace is quite the overhead (as a new release build needs to be created).

So a better solution would be to:

  1. Add a GitHub action that runs when we create a new release version and uploads it as artefact to the GitHub action workflow run (also for the staging app versions).
  2. Update our script to:
    1. Get the app version from the file name of the trace
    2. Download the artefact from the GitHub action runs for that version

I can help with implementing that.

@grgia
Copy link
Contributor

grgia commented Jun 17, 2024

@hannojg, thanks for looking into this. Shall I assign you this one?

@hannojg
Copy link
Contributor

hannojg commented Jun 17, 2024

Yes please, I'd go ahead and create two PRs, that will:

  1. Upload a source map when we make a new release version
  2. Update our scripts (and documentation) for symbolicating a trace using the uploaded source maps

@hannojg
Copy link
Contributor

hannojg commented Jun 17, 2024

Update for step 1 uploading the source maps:

  • I found that we already upload source maps, support was added in
  • However, its broken and not uploading for android and iOS
  • Additionally it would be nice if we can link the assets with the tag (have to see if that works)
    • Update: doesn't work 😅

So I will fix the existing system first

Screenshot 2024-06-17 at 10 18 41

@hannojg
Copy link
Contributor

hannojg commented Jun 17, 2024

@grgia First PR for fixing the upload of source maps is up, can you help me get it merged? Thanks! 😊

@hannojg
Copy link
Contributor

hannojg commented Jun 18, 2024

@grgia The next PR is ready:

A script was added that can be used to easily symbolicate cpu profiles

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 18, 2024
@hannojg
Copy link
Contributor

hannojg commented Jun 19, 2024

Two things:

  • The first PR was reverted as it seemed to have caused build issues on iOS, will create a new one
  • For the second PR that introduces the symbolicate script: I found a better way to get the source map artifact from GitHub. Will mark the PR as ready once I incorporated these changes

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 21, 2024
@melvin-bot melvin-bot bot changed the title MEDIUM: Enable Function Symbolication for Detailed Performance Tracing [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-28. 🎊

For reference, here are some details about the assignees on this issue:

  • @hannojg does not require payment (Contractor)

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 21, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.0-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-28. 🎊

For reference, here are some details about the assignees on this issue:

  • @hannojg does not require payment (Contractor)

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 25, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing [HOLD for payment 2024-07-02] [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.1-19 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-02. 🎊

For reference, here are some details about the assignees on this issue:

  • @hannojg does not require payment (Contractor)

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jun 27, 2024
@grgia grgia added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 1, 2024
Copy link

melvin-bot bot commented Jul 1, 2024

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot removed the Overdue label Jul 1, 2024
@grgia
Copy link
Contributor

grgia commented Jul 1, 2024

closing as complete, reviews were internal

@grgia grgia closed this as completed Jul 1, 2024
@github-project-automation github-project-automation bot moved this from MEDIUM to Done in [#whatsnext] #quality Jul 1, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 3, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-02] [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing [HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-28] MEDIUM: Enable Function Symbolication for Detailed Performance Tracing Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-10. 🎊

For reference, here are some details about the assignees on this issue:

  • @hannojg does not require payment (Contractor)

Copy link

melvin-bot bot commented Jul 3, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@grgia] The PR that introduced the bug has been identified. Link to the PR:
  • [@grgia] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@grgia] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@hannojg] Determine if we should create a regression test for this bug.
  • [@hannojg] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Task Weekly KSv2
Projects
Development

No branches or pull requests

5 participants