sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Subscribe to `lowMemory` event

Open bruno-garcia opened this issue 4 years ago • 2 comments
trafficstars

When Unity raises a lowMemory event, the SDK should add a breadcrumb.

Potentially, we can also persist a file to help heuristics on restart flag a OOM crash, or simply add that N seconds/minutes before there was a low memory warning.

Another alternative is to raise a warning event but that might be better as a opt-in feature, where users can check a checkbox in Sentry's editor UnityWindow

Relevant to docs:

This event is supported on iOS, Android, and Universal Windows Platform (UWP).

bruno-garcia avatar Mar 27 '21 03:03 bruno-garcia

Potentially use the same heuristics used on the iOS SDK: https://docs.sentry.io/platforms/apple/configuration/out-of-memory/ /cc @philipphofmann

bruno-garcia avatar May 14 '21 16:05 bruno-garcia

The low memory notification and OOM are not connected on the Cocoa SDK because there is no guarantee that the OS posts a low memory notification before receiving an OOM. All we do is adding a breadcrumb.

philipphofmann avatar May 21 '21 10:05 philipphofmann