getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
781 stars 312 forks source link

Attach memory info to watchdog terminations #4003

Open philipphofmann opened 1 month ago

philipphofmann commented 1 month ago

Description

The Sentry SDK could sample the memory information once every x seconds and store it with the app state on a bg thread and report that information when a watchdog termination occurs. Then, users would know if the watchdog termination was due to an OOM. This only works for OOMs that slowly add up and not for high spikes in memory pressure.

Related to https://github.com/getsentry/sentry-cocoa/issues/2514, https://github.com/getsentry/sentry-cocoa/issues/3890 and https://github.com/getsentry/sentry-cocoa/issues/3518.

kahest commented 1 month ago

It probably makes sense to tackle this as part of a larger initiative to improve OOM/Watchdog terminations - see linked issues above.