[PLAT-7139] Thermal state and Thermal Kill detection #1171
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Detect Thermal Kill errors (where the OS terminates an app due to a device overheating), add a
thermalState
property to thedevice
tab, and add thermal state change breadcrumbs.Changeset
thermalState
(inmetaData
) and observe thermal state notifications (to add breadcrumbs) on all supported platforms (requires iOS / tvOS 11.0 or later)BugsnagSystemState
as "unexpected termination" detection. Thermal Kill events have the same payload as OOM events (no stacktrace or threads) but different errorClass, message and type.BSGGlobals
toBSGUtils
in order to rehome UIDeviceOrientation -> NSString functionTesting
E2E scenario verifies that a Thermal Kill is reported if an app is killed while the thermal state is critical.
E2E scenarios verify that thermal state metadata and breadcrumbs are recorded.
Successful full E2E run: https://buildkite.com/bugsnag/bugsnag-cocoa/builds/3178
Unit test case for OOMs has been amended to verify logic now residing in
BugsnagSystemState