woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
257 stars 108 forks source link

Log available memory upon receiving memory warning. #12607

Closed selanthiraiyan closed 2 weeks ago

selanthiraiyan commented 2 weeks ago

Closes: #12606

Description

To debug Sentry WatchDogTermination issues, we are going to add a log message upon receiving a memory warning.

Internal - peaMlT-zd-p2#comment-1388

Testing instructions

Screenshots

Screenshot 2024-04-29 at 10 37 16 PM
wpmobilebot commented 2 weeks ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr12607-c93d04d
Version18.4
Bundle IDcom.automattic.alpha.woocommerce
Commitc93d04d556764d340bcc6b7f0f8bccd2228f3dfc
App Center BuildWooCommerce - Prototype Builds #8891

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

selanthiraiyan commented 2 weeks ago

Thanks for the review, @toupper!

One question, DDLogDebug logs are sent to Sentry, right? Where in the code is that happening? I am curious about that logic, but I couldn't find it :)

The log file will be uploaded to this WPCOM endpoint by the Automattic-Tracks-iOS library. Code

To find the relevant log file,

If the downloaded log file has the log message "Received memory warning:" we will know that a particular Sentry event had memory issues.

toupper commented 2 weeks ago

Awesome, thanks a lot for the thorough explanation @selanthiraiyan !