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

Capture and report Thread.state for Android Runtime threads #1372

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Sep 15, 2021

Goal

Capture and report the Thread.state of all captured threads to help in diagnosing issues.

This PR is a clone of #1367

Design

To separate our implementation from any future platform changes or errors, a new Bugsnag Thread.State enum was introduced, reflecting the possible thread-states currently available on Android. The new enum also includes an UNKNOWN state which is used in cases where we either cannot capture or map the platform state.

Testing

Manual testing with the Example app and a debug server. Updated existing unit tests and end-to-end tests to include checks for the new Thread.State field.

@lemnik lemnik force-pushed the PLAT-7204/add-thread-state branch 4 times, most recently from 18993a6 to b1d9e2e Compare September 24, 2021 16:53
@lemnik lemnik merged commit 196fa71 into next Sep 27, 2021
@lemnik lemnik deleted the PLAT-7204/add-thread-state branch September 27, 2021 08:22
lemnik added a commit that referenced this pull request Sep 29, 2021
* docs: correct changelog entry

* test: remove flaky test case

* Capture and report `Thread.state` for Android Runtime threads (#1372)

* feat(threads): capture and report `Thread.state` for Android Runtime threads

* fix(thread state): added nullability annotation to `Thread.State.getDescriptor`

* feat(unity): allow Client to be initialised with the Notifier details for reporting (#1386)

* Capture ndk thread states (#1390)

* feat(threads): add `bsg_thread` to the NDK plugin (#1371)

* migrate ndk reports for the new threads property (#1376)

* feat(threads): add `bsg_thread` to the NDK plugin

* feat(thread state): migrate v5 ndk reports to the new v6

* Capture native thread states (#1384)

* feat(thread state): capture and report native thread states in NDK crashes

* fix(native threads): native threads obey `Configuration.sendThreads`

* test(native threads): test scenarios for native thread reporting

* fix(native threads): map native thread-status codes to a descriptive string

* fix: updated CHANGELOG for native thread state reporting

* v5.14.0

* v5.14.0 - Changelog update

Co-authored-by: fractalwrench <fractalwrench@gmail.com>
@lemnik lemnik mentioned this pull request Sep 30, 2021
lemnik added a commit that referenced this pull request Sep 30, 2021
* docs: correct changelog entry

* test: remove flaky test case

* Capture and report `Thread.state` for Android Runtime threads (#1372)

* feat(threads): capture and report `Thread.state` for Android Runtime threads

* fix(thread state): added nullability annotation to `Thread.State.getDescriptor`

* feat(unity): allow Client to be initialised with the Notifier details for reporting (#1386)

* Capture ndk thread states (#1390)

* feat(threads): add `bsg_thread` to the NDK plugin (#1371)

* migrate ndk reports for the new threads property (#1376)

* feat(threads): add `bsg_thread` to the NDK plugin

* feat(thread state): migrate v5 ndk reports to the new v6

* Capture native thread states (#1384)

* feat(thread state): capture and report native thread states in NDK crashes

* fix(native threads): native threads obey `Configuration.sendThreads`

* test(native threads): test scenarios for native thread reporting

* fix(native threads): map native thread-status codes to a descriptive string

* fix: updated CHANGELOG for native thread state reporting

* v5.14.0

* v5.14.0 - Changelog update

Co-authored-by: fractalwrench <fractalwrench@gmail.com>

Co-authored-by: fractalwrench <fractalwrench@gmail.com>
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