Reduce timeout of AsyncHttpTransport to avoid ANR#2879
Merged
stefanosiano merged 2 commits intofeat/7.0.0from Aug 4, 2023
Merged
Reduce timeout of AsyncHttpTransport to avoid ANR#2879stefanosiano merged 2 commits intofeat/7.0.0from
stefanosiano merged 2 commits intofeat/7.0.0from
Conversation
…fault 4s in Android and 15s in Java) to avoid ANRs in Android
Contributor
|
Contributor
Performance metrics 🚀
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feat/7.0.0 #2879 +/- ##
================================================
+ Coverage 81.26% 81.44% +0.17%
- Complexity 4560 4648 +88
================================================
Files 350 354 +4
Lines 16866 17108 +242
Branches 2272 2313 +41
================================================
+ Hits 13706 13933 +227
- Misses 2219 2226 +7
- Partials 941 949 +8
☔ View full report in Codecov by Sentry. |
markushi
reviewed
Aug 3, 2023
| options.getLogger().log(SentryLevel.DEBUG, "Shutting down"); | ||
| try { | ||
| if (!executor.awaitTermination(1, TimeUnit.MINUTES)) { | ||
| if (!executor.awaitTermination(options.getFlushTimeoutMillis(), TimeUnit.MILLISECONDS)) { |
Member
There was a problem hiding this comment.
@adinauer this change will also affect backend, hope that's fine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
reduced timeout of AsyncHttpTransport close to flushTimeoutMillis (default 4s in Android and 15s in Java) to avoid ANRs in Android
💡 Motivation and Context
Closing the hub could cause an ANR, since the SDK would wait for 1 minute to send any cached envelope
Fixes #2864
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps