Page MenuHomePhabricator

Improve data logging for better debugging
Closed, ResolvedPublic


It is difficult to debug some of our more common OTRS complaints (such as losing saved articles) without more information. Can we add an option that allows the user (if they choose) to zip up their app container folder and Core Data database details and attach?

We also discussed leaning on our event logging - every time we log via that system, we should also log to the file that is attached to a bug report. This will give us some breadcrumb details so we can see what path the user was on.

Update: Decided not to mess with event logging at this point, and those tables are getting stripped out before the user shares for privacy purposes. I am exporting their synced reading lists and reading list entries as returned by the server, so we can compare both local and server-side data and see if anything is getting dropped between them.

QA Steps

  1. Fresh install, log in.
  2. Enable syncing via app Settings > Article storage and syncing.
  3. Create some reading lists and save some articles.
  4. Go to App Settings > Help and feedback.
  5. Tap "Export User Data" button at the bottom
  6. After a while, you should see a share activity sheet pop up. Airdrop the zip file to your machine.
  7. Open the zip file, confirm you see data (console.log, Permanent Cache directory, User Data Export Sync Info json file, and some Wikipedia.sqlite database files).
  8. Repeat steps 1-6 without being logged in, or without the toggle selected in step 2. You should still be able to export, but the User DataExport Sync Info json file will be more sparse since there's no remote server data to pull from.
  9. Stress test some of these if you can - try a user with +500 saved articles and many reading lists.

Event Timeline

LGoto triaged this task as Medium priority.Jul 20 2020, 6:39 PM
LGoto moved this task from Needs Triage to Engineering Backlog on the Wikipedia-iOS-App-Backlog board.
LGoto added subscribers: cmadeo, LGoto.

Per meeting, will need to add opt-in screen.

Caveat: let's do this if we can't single out distinct device data in possible MEP data logging backend.

@JMinor The latest Experimental build has my progress on this. You can export a zip file of the app container via app Settings > Help and Feedback > Export User Data in the bottom toolbar. Things remaining are to reduce the amount of data we export (only the necessary ones for now to debug saved articles), plus whatever y'all would like to add to the flow or button placement.

Thanks. Sent you the archive on Slack via the share sheet and it worked smothly on my end.

For the user edutcation piece please add an alert when the user presses the share libary button, before the share sheet is presented.

Initial string (subject to legal review):
"Sharing your app library includes data on your Reading lists and history, preferences and Explore feed content. This data file should only be shared with a trusted recipient to use for technical diagnostic purposes. "

With the options "Share" and "Cancel". Share should proceed to the flow you have in the Experimental build.

Most work is complete and in, just waiting on final copy now.

IMG_E94E5DD4FFCC-1.jpeg (2×1 px, 872 KB)

@JMinor I had to add an alert view title, otherwise the message appeared entirely bold and weird. Let me know if you want me to change anything!

@JMinor also kicked off another Experimental build with the current state of the PR. Thanks!

@Tsevener - Are there any steps to repro this one? Is it maybe a Shay, data type thing? Thanks

@ABorbaWMF sorry about the delay - I added some test steps. Let me know if you have any questions!

Looks good on 6.9.3 (1960) and (1961)