Sentry Android SDK 8.51.0 switches profiling to Perfetto via ProfilingManager
Brief
Sentry Android SDK 8.51.0 uses Perfetto via Android's ProfilingManager API for profiling on Android 15+ devices, replacing the legacy in-process tracer.
What changed
- Profiling on Android 15+ (API 35+) now records Perfetto-based stack samples via ProfilingManager; devices below Android 15 keep using the legacy profiler.
- No configuration change needed for continuous profiling users — upgrading to 8.51.0 switches Android 15+ devices automatically.
- New option enableLegacyProfiling defaults to true; set options.isEnableLegacyProfiling = false to profile only via Perfetto.
Why it matters
- Avoids crashes caused by the legacy Debug.startMethodTracing tracer when native threads attach and exit without detaching.
- Lower CPU and memory overhead since profiling runs in a system process; profiles are more representative.
- Raw Perfetto traces can be downloaded from a profile and opened in ui.perfetto.dev.
Limits to know
- ProfilingManager is only on Android 15+, roughly 41% of active Android devices.
- Android rate-limits profiling requests, so not every session gets a profile even with profileSessionSampleRate set to 1.0.
- Disable the rate limiter locally with: adb shell device_config put profiling_testing rate_limiter.disabled true.
Generated by AI from the original article. Check the source for full details.