Repository navigation
Closed
Closed
Copy link
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionDailyKSv2KSv2InternalRequires API changes or must be handled by Expensify staffRequires API changes or must be handled by Expensify staffNewFeatureSomething to build that is a new item.Something to build that is a new item.Task
Description
Strategy:
A billion users means a billion problems. To diagnose and solve them at scale, we capture client-side logs and upload centrally.
Problem:
Some problems can't be diagnosed cleanly after the fact from the logs, for a few reasons:
- External contributors don't have access to production logs.
- Internal engineers do have production access, but they're often cumbersome to access.
- The logs are often ambiguous, such as if you have multiple devices connected and tabs open at the same time -- reverse engineering what happened for a particular client is confusing and time consuming.
- Observing logs in realtime is cumbersome or sometimes impossible, which slows down and complicates testing.
- Even if you have all the access you need, when talking with a user sometimes it's difficult to find the logs specific to them.
Solution:
Let's expand our ability to remotely diagnose production devices with better dev tools built into the app itself. Specifically:
- Add a
Troubleshootingsection to theAvatar > Aboutpage, just aboveReport a bug- This will always be available, both on staging and production builds
- Move the following
Test preferencessettings into this new menu:- Use staging server
- Force offline
- Simulate failing network requests
- Authentication status: Invalidate
- Device credentials: Destroy
- Add
Reset and refresh, which wipes Onyx clean except for the minimum needed to call OpenApp (so you don't need to reauthenticate) - Add
View consolewhich opens a simple console:- This would first open up and initialize with all locally stored logs, so you can scroll back and see what happened
- It would also append new logs in realtime
- There would also be a
Savebutton that just copies all available logs into a text file that is saved on the device - Add a
Sharebutton that brings up aSearchselector and just posts the logs into the selected room (and then leaves the user navigated there, so they can talk about them). I'm imagining this would be useful for chatting with a real world user and asking them to do something and send you the logs. - At the bottom is a command line that works similar to the Chrome console, where you can execute arbitrary JavaScript, with the results output to the console
This is blocking #33040.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01c2a08b8b8ae90e21
- Upwork Job ID: 1744202378047897600
- Last Price Increase: 2024-01-15
- Automatic offers:
- fedirjh | Reviewer | 28115102
Metadata
Metadata
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionDailyKSv2KSv2InternalRequires API changes or must be handled by Expensify staffRequires API changes or must be handled by Expensify staffNewFeatureSomething to build that is a new item.Something to build that is a new item.Task
Type
Projects
- StatusShow more project fieldsCRITICAL
Activity
[-]HIGH: Add `Avatar > About > Troubleshooting` section [/-][+][$500] HIGH: Add `Avatar > About > Troubleshooting` section [/+]melvin-bot commentedon Jan 8, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01c2a08b8b8ae90e21
melvin-bot commentedon Jan 8, 2024
Triggered auto assignment to @greg-schroeder (
NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.melvin-bot commentedon Jan 8, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)159 remaining items
melvin-bot commentedon Feb 19, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.42-5 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-02-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 19, 2024
BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
marcochavezf commentedon Feb 23, 2024
Hi @TMisiukiewicz! We got an alert in the backend that we're receiving a massive message log from NewDot, and it seems it's coming from this PR that was deployed recently. This is an example of the message:
We are already trimming the message in the backend using this logic:
And I was wondering if we do the same in the frontend also to avoid sending large amounts of data for the logs, thoughts?
TMisiukiewicz commentedon Feb 23, 2024
Hi @marcochavezf! That's weird because there is a condition to not attach logs with pattern
[Onyx] merge() called for key: logsbecause otherwise it would create an infinite loop and end up with tons of huge log messages (since new log is attached tologs, which triggers logging a message that merge was called for key logs... and so on). Is this happening frequently? My only idea for now is someone did some changes in the codebase locally and removed this conditionmarcochavezf commentedon Feb 23, 2024
Oh interesting, I happened several times yesterday, and according to the logs it wasn't coming from a local environment. I will report again if the alert pops up again, thanks!
greg-schroeder commentedon Feb 26, 2024
Reviewing
greg-schroeder commentedon Feb 26, 2024
Paid!
@fedirjh can you create a regression test for this new feature? Thanks!
[-][HOLD for payment 2024-02-26] [$500] HIGH: Add `Avatar > About > Troubleshooting` section [/-][+][Regression test required] [$500] HIGH: Add `Avatar > About > Troubleshooting` section [/+]fedirjh commentedon Feb 26, 2024
Regression Test Proposal
Test 1 :
Test 2 :
techievivek commentedon Feb 27, 2024
Nice, regression tests look good to me. 👍 CC @greg-schroeder
greg-schroeder commentedon Feb 28, 2024
LGTM! Filing!