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-10016] Use original unhandled value for persisting user-reported events #1549

Merged

Conversation

yousif-bugsnag
Copy link
Contributor

@yousif-bugsnag yousif-bugsnag commented Apr 19, 2023

Goal

Use the original unhandled state of an event and not the overridden unhandled value when determining whether to store an event or upload immediately.

This is more representative of whether the runtime is about to crash, rather than what the developer has changed it to (which is more likely to do with their stability score).

Changeset

  • Added a new property originalUnhandledValue to BugsnagHandledState that uses the unhandledOverridden flag to determine the original handled-ness of the event.
  • Updated notifyInternal to check originalUnhandledValue when deciding whether to persist an event or send immediately

Testing

  • Added a new unit test for originalUnhandledValue
  • Manually tested overriding the unhandled flag from a React Native (JS) callback and an onError block

@github-actions
Copy link

github-actions bot commented Apr 19, 2023

Bugsnag.framework binary size increased by 176 bytes from 707,136 to 707,312

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%     +96  +0.1%     +96    String Table
  +0.0%     +96  +0.0%     +96    __TEXT,__text
  +0.1%     +80  +0.1%     +80    Symbol Table
  +0.1%     +40  +0.1%     +40    __DATA,__objc_const
  +0.1%     +23  +0.1%     +23    __TEXT,__objc_methname
  +0.2%      +8  +0.2%      +8    __DATA,__objc_selrefs
  +0.1%      +4  +0.1%      +4    __TEXT,__unwind_info
  -0.6%     -48  -0.3%     -48    [__DATA]
  -0.5%    -123  -0.5%    -123    [__TEXT]
  [ = ]       0  -1.3%    -176    [__LINKEDIT]
  +0.0%    +176  [ = ]       0    TOTAL

Generated by 🚫 Danger

@yousif-bugsnag yousif-bugsnag force-pushed the yousif/PLAT-10016/persist-original-unhandled-events branch from 6442533 to d02c20f Compare April 19, 2023 11:55
@yousif-bugsnag yousif-bugsnag merged commit 23bb82c into next Apr 19, 2023
@yousif-bugsnag yousif-bugsnag deleted the yousif/PLAT-10016/persist-original-unhandled-events branch April 19, 2023 13:01
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