Profiling Troubleshooting for Android
Learn how to troubleshoot your profiling setup.
Using the recommended profiler?
The crash-related issues below only affect Legacy Profiling, which uses the Android runtime's tracer. The recommended ProfilingManager (Perfetto) based UI Profiling is not affected.
Legacy Profiling uses the Android runtime's tracer under the hood to sample threads. There are known issues that this tracer can cause crashes in certain circumstances. The recommended ProfilingManager (Perfetto) based UI Profiling avoids these issues. Read on for more information, and subscribe to this GitHub issue for updates.
As of October 2024, two of these crashes (see 1, 2) have been acknowledged and fixed by Google. The fixes are being rolled out to affected devices by Google, but the crashing behavior might still be present on devices that didn't receive the fix yet.
There is one other issue, where the likely root cause is incorrect native thread handling by app code or third party code. This means that it can also not be fixed in the Sentry SDK. If you experience this, please comment on the GitHub issue.
sentry.io
If you don't see any profiling data in sentry.io, you can try the following:
- Ensure that Tracing is enabled.
- Ensure that the automatic instrumentation is sending performance data to Sentry by going to the Performance page in sentry.io.
- If the automatic instrumentation is not sending performance data, try using custom instrumentation.
- Enable debug mode in the SDK and check the logs.
- On Android 15 (API level 35) and higher, check the logs for
ERROR_FAILED_RATE_LIMIT_PROCESSorERROR_FAILED_RATE_LIMIT_SYSTEM. These mean Android's ProfilingManager rejected the profiling request. To learn more, see When Android Rejects Profiling Requests.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").