-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Android Profiler on calling thread #2691
Conversation
…ng to the executorService removed any file checks due to the code running possibly on the main thread wrapped Debug methods into try/catch to compensate lack of file checks
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3481dd7 | 347.71 ms | 407.70 ms | 59.99 ms |
aa0dbc4 | 283.43 ms | 330.94 ms | 47.51 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3481dd7 | 1.72 MiB | 2.26 MiB | 552.61 KiB |
aa0dbc4 | 1.72 MiB | 2.26 MiB | 552.61 KiB |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #2691 +/- ##
=========================================
Coverage 81.05% 81.05%
Complexity 4427 4427
=========================================
Files 345 345
Lines 16356 16356
Branches 2219 2219
=========================================
Hits 13258 13258
Misses 2170 2170
Partials 928 928 ☔ View full report in Codecov by Sentry. |
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.
LGTM, but in the original issue this was somehow related to slow network connection. Have you managed to reproduce it? I wasn't sure how the slow connectivity can be the reason here, because our HttpConnection uses a different thread pool (also single-threaded), so in theory they should not conflict with SentryExecutorService
I reproduced it by spawning lots of transactions and having a fake dsn to have all the envelopes sending timeout. |
@stefanosiano ah gotcha, that makes sense, yes! And then we were blocking on the profiler, although the executor was already busy. I think it's fine to use the executor as long as we don't call blocking |
When will the new version be released to fix the issue? |
📜 Description
AndroidTransactionProfiler now starts/stops profiles without offloading to the executorService
removed any file checks due to the code running possibly on the main thread
wrapped Debug methods into try/catch to compensate lack of file checks
💡 Motivation and Context
If the executor service is very busy, the profiler would start with some delay, and when finishing it would wait for the executor to finish, possibly causing ANRs.
fixes #2649
💚 How did you test it?
Unit test
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps