getsentry / getsentry/sentry-cocoa
MemoryBreadcrumbs V2
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 418
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 106
Description
### Description
The SDK reports memory warning breadcrumbs by subscribing to the `addObserverForName:UIApplicationDidReceiveMemoryWarningNotification`
[https://github.com/getsentry/sentry-cocoa/blob/6c7ab81cc711f1c49ef6fa13c5c842c6d7539d33/Sources/Sentry/SentryBreadcrumbTracker.m#L79-L93]()
With [https://github.com/getsentry/sentry-cocoa/pull/2493]() we now use a dispatch queue for a more fine grained approach
[https://github.com/getsentry/sentry-cocoa/blob/bb77d06dfd2f48a43a891dd688a81a39cdbd28de/Sources/Sentry/SentrySystemWrapper.mm#L73-L88]()
With that we could also create breadcrumbs for `DISPATCH_MEMORYPRESSURE_NORMAL`, `DISPATCH_MEMORYPRESSURE_WARN`, `DISPATCH_MEMORYPRESSURE_CRITICA`. Furthermore, we could add the currently available memory with [https://github.com/getsentry/sentry-cocoa/blob/bb77d06dfd2f48a43a891dd688a81a39cdbd28de/Sources/Sentry/SentrySystemWrapper.mm#L11-L33]()
Thermal State
[https://github.com/getsentry/sentry-cocoa/blob/feb20550165212a6b2af231cb60bf0d95613c25c/Sources/Sentry/SentryMetricProfiler.mm#L171-L184]()
Contributor guide
Assessment
This issue has not been assessed yet.