sentry-cocoa: Missing breadcrumbs in Watchdog Terminations
Platform
iOS
Environment
Develop
Installed
Swift Package Manager
Version
8.18.0
Did it work on previous versions?
No
Steps to Reproduce
- Trigger applicationDidReceiveMemoryWarning to execute in AppDelegate
- Log a breadcrumb in this method. Could be anything.
- Force a watchdog termination error to be logged
Expected Result
I would expect that the breadcrumb logged in applicationDidReceiveMemoryWarning shows up in the sentry error.
Actual Result
The breadcrumb intermittently appears in the sentry error.
This may not be a bug. I’m more looking for clarification here. Is it expected that watchdog termination errors may not always be able to collect all the breadcrumbs due to the nature of the error? Also, do the breadcrumbs reported possibly contain data related to the latest launch rather than when the actual watchdog termination occurred?
For example, in our applicationDidReceiveMemoryWarning, we log a breadcrumb with the following data:
{
appState: {active, inactive, etc.)
availableAppMemory: {some amount of GB}
// this is equivalent to what you would see in xcode debugger when looking at memory in MB
memoryInMB: {some amount of memory in MB}
}
We noticed in our breadcrumbs for a watchdog termination that memoryInMB specified something like 16 MB and the appState was “active”. However, when I saw this data get logged the MBs were actually something like 130 MB and the app state was inactive. I’m wondering if this contextData is gathered on the next app launch somehow and that is why the data appears to be mismatched?
Are you willing to submit a PR?
Possibly
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 17 (6 by maintainers)
Sorry for the delay here @philipphofmann. I’ll try and get you a video tomorrow to show you how I’m reproducing.