getsentry / sentry-cocoa

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

Add memory info to low memory breadcrumb #3518

Open barisyild opened 8 months ago

barisyild commented 8 months ago

Problem Statement

image

LOW_MEMORY does not provide enough information. Is it possible that low memory warnings contain detailed information about memory?

Solution Brainstorm

Things like memory usage may come up with the LOW_MEMORY warning.

Are you willing to submit a PR?

No response

philipphofmann commented 8 months ago

We could use the same approach as we already do for getting memory statistics for profiles https://github.com/getsentry/sentry-cocoa/blob/3297d6e29cd37151f68e9c605aea8b44e5e432cb/Sources/Sentry/SentryMetricProfiler.mm#L176-L177

philipphofmann commented 7 months ago

We could also add a memory footprint breadcrumb every x seconds for x seconds after receiving this warning, to see if the footprint goes down.