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

Improve app hang event accuracy #1118

Merged
merged 3 commits into from
Jun 10, 2021
Merged

Conversation

nickdowell
Copy link
Contributor

Goal

Reduce the likelihood of app hang events containing breadcrumbs and app & device information that occurred after the detection of the hang.

App hang events could contain breadcrumbs that were left after the detection of the hang due to the amount of time it takes to record the stack traces (and notably perform symbolication prior to v6.9.4)

Changeset

The app hang detector now records the timestamp and system info as soon as the hang is detected, and breadcrumbs are subsequently filtered to remove any that were left while the app hang detector was performing its work.

bsg_ksmachisBeingTraced() is now checked before applicationIsInForeground since the former involves sysctl() and is much slower - now there is less opportunity for the foreground state to change between the check and event creation.

Testing

New unit test case to cover filtering of breadcrumbs.

App hang E2E test now verifies that a breadcrumb left during the hang is still included.

@nickdowell nickdowell requested review from kstenerud and kattrali June 9, 2021 16:10
@github-actions
Copy link

github-actions bot commented Jun 9, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size increased by 584 bytes from 1,125,592 to 1,126,176

Generated by 🚫 Danger

@nickdowell nickdowell changed the title Nickdowell/app hang event accuracy Improve app hang event accuracy Jun 10, 2021
@nickdowell nickdowell merged commit 64f52b0 into next Jun 10, 2021
@nickdowell nickdowell deleted the nickdowell/app-hang-event-accuracy branch June 10, 2021 07:30
@nickdowell nickdowell mentioned this pull request Jun 16, 2021
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.

2 participants