Reduce flush timeout to 4s on Android to avoid ANRs#2858
Reduce flush timeout to 4s on Android to avoid ANRs#2858markushi merged 3 commits intofeat/7.0.0from
Conversation
|
Performance metrics 🚀
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feat/7.0.0 #2858 +/- ##
================================================
+ Coverage 81.26% 81.31% +0.04%
- Complexity 4560 4564 +4
================================================
Files 350 351 +1
Lines 16866 16867 +1
Branches 2272 2272
================================================
+ Hits 13706 13715 +9
+ Misses 2219 2211 -8
Partials 941 941
☔ View full report in Codecov by Sentry. |
|
@markushi there's one place where I'd like to keep the default 15s for flush timeout and it's this sentry-java/sentry/src/main/java/io/sentry/cache/EnvelopeCache.java Lines 430 to 438 in f60279b when we're waiting for the previous unfinished session to be flushed to disk. Would it be possible to keep the 15s value there (we could just have a constant actually)? |
| try { | ||
| return previousSessionLatch.await(options.getFlushTimeoutMillis(), TimeUnit.MILLISECONDS); | ||
| // use fixed timeout instead of configurable options.getFlushTimeoutMillis() to ensure there's | ||
| // enough time to flush the session to disk |
There was a problem hiding this comment.
@romtsn if you've better reasoning here, please adapt the comment 😊
📜 Description
Reduce flush timeout to 4s on Android to avoid ANRs
💡 Motivation and Context
Fixes #2732
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps