-
Notifications
You must be signed in to change notification settings - Fork 207
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
Attempt delivery on crash if configured #1749
Attempt delivery on crash if configured #1749
Conversation
e8554c5
to
f1da738
Compare
Android notifier sizes
Generated by 🚫 Danger |
2129dac
to
0ec3bf5
Compare
@@ -55,7 +56,11 @@ void deliver(@NonNull Event event) { | |||
String severityReasonType = event.getImpl().getSeverityReasonType(); | |||
boolean promiseRejection = REASON_PROMISE_REJECTION.equals(severityReasonType); | |||
boolean anr = event.getImpl().isAnr(event); | |||
cacheEvent(event, anr || promiseRejection); | |||
if (immutableConfig.getAttemptDeliveryOnCrash()) { | |||
cacheAndSendSynchronously(event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeliveryDelegate.deliver
gets called for all kinds of higher level errors, including ANRs and handled errors (via Client.populateAndNotifyAndroidEvent
). I don't think we should be blocking the thread for ANRs and non-fatal events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on ANRs and such. I'll modify the order of these if
checks to only act on unhandled errors that were not previously attemptSend
.
0ec3bf5
to
709819a
Compare
… `ImmutableConfig` and allow a 3 second timeout during crash to attempt delivery
709819a
to
bf249d7
Compare
Goal
Attempt to deliver crashes when they happen if configured.
Design
The
DeliveryDelegate.cacheEvent
flag forattemptSent
now attempts immediate delivery of just that single eventTesting
A new test scenario was introduced to test that a crash can be delivered without a fixture restart.