Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-5449] Include metadata in OOM events #915

Merged
merged 7 commits into from
Dec 1, 2020
Merged

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Nov 26, 2020

Goal

OOM events were missing some important data that are present in other types of error:

  • custom metadata provided by the app developer
  • user information

The changes in this PR add this information to OOMs.

Design

See the design document on Confluence.

Changeset

Metadata is now written to files on disk and read from there when constructing a KSCrashReport.

-[BugsnagEvent initWithOOMData:] has been amended to use this newly available information.

The device data being captured in BugsnagSystemState becomes redundant as it exists in the "state" metadata, so has been removed.

out_of_memory.feature no longer checks for device.orientation because that is not present in other types of error.

Testing

Manually verified by triggering OOMs and examining payload.

Updated out_of_memory.feature to verify that custom metadata and user information is present and in the expected location within the payload.

@nickdowell nickdowell marked this pull request as ready for review November 27, 2020 10:59
Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/Helpers/BSGJSONSerialization.m Show resolved Hide resolved
@nickdowell nickdowell merged commit e4a90fa into next Dec 1, 2020
@nickdowell nickdowell deleted the nickdowell/oom-metadata branch December 1, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants