Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Sentry 3 min read Release mediumAdept

Android profiling now uses Perfetto via ProfilingManager

Sentry Android SDK 8.51.0 switches profiling on Android 15+ (API 35+) from in-process Debug.startMethodTracing to Perfetto-based stack sampling via the system ProfilingManager API, while older devices fall back to the legacy profiler. Running out of process avoids an ART tracer crash triggered by native threads that exit without detaching, shifts most CPU and memory overhead into a system process, and yields more representative profiles. Android rate-limits profiling requests, so even a 1.0 session sample rate won't capture every session; an adb device_config flag disables the limit for local testing, and a new enableLegacyProfiling option can be set to false to avoid the legacy tracer entirely.

Related posts

  • The Sentry Android SDK is now 20-30% faster!

    Sentry mediumAdept

    Sentry's Android SDK init time dropped 20-30% between versions 8.43.0 and 8.54.0, alongside reduced memory allocation, fixed leaks and up to 10% less background CPU. The team found bottlenecks with Perfetto traces and validated over 40 changes with Android Macrobenchmark on a clock-locked Pixel 3. Highlighted changes: the Gradle plugin writes manifest options and class-availability checks into bytecode at build time, avoiding manifest parsing and reflection (6.5% gain); a custom DSN parser replaces java.net.URI (6ms down to 1µs); and one-off threads move to shared executor pools, saving 3MB of heap from ART's 1MB thread stacks. Upgrading to SDK 8.54.0+ and Gradle plugin 6.20.0+ is enough to get the gains.

  • Reducing Android scope-sync overhead in Sentry Flutter

    Sentry mediumAdept

    Sentry's Flutter SDK cut Android scope-update processing time by 27–30% by removing duplicate normalization and encoding JSON directly to UTF-8 bytes. Scope data was being normalized on both the calling isolate and the worker isolate, so normalizing once halved that step (e.g. 2.71 ms to 1.35 ms for 238 KB). Replacing jsonEncode plus utf8.encode plus a Uint8List copy with JsonUtf8Encoder saved 16% of encoding time, while removing the buffer copy alone saved only about 2%. Pixel 4 benchmarks show savings of about 11 µs per small breadcrumb and 2.29 ms for 238 KB payloads, and the changes ship in sentry_flutter 9.26.0.

  • Sentry's Flutter SDK 10.0: Streaming Traces and More Accurate Crash-Free Rates

    Sentry mediumAdept

    Sentry's Flutter SDK 10.0 switches tracing to a streaming model that sends finished spans in batches instead of waiting for the whole transaction, with `Sentry.startSpan` for custom instrumentation and an opt-out via `SentryTraceLifecycle.static`. Unhandled Flutter errors that don't kill the app no longer mark sessions as crashed (they end as `unhandled`), making crash-free rates more accurate. App startup becomes its own `app.start` root trace on Android and iOS, with an optional extension API. The release also removes the enable flags for logs and metrics, captures Dio failures that have no HTTP response, masks Flutter `SensitiveContent` in Replay, drops profiling and raises minimums to Dart 3.12 and Flutter 3.44, with sampling and filter rules needing review during upgrade.

  • Accelerating our Android apps with Baseline Profiles

    Meta Engineering mediumAdept

    Meta generates Android Baseline Profiles from production class-load and method-usage data to trigger ART install-time AOT compilation and app image creation, improving startup, scroll and navigation metrics by 3% to 40% across its apps. Cloud Profiles fell short because they help only later users in a rollout, give developers no control, are skewed toward early startup (ART treats startup as done after five seconds), and work only through Google Play. Meta samples class loads through a custom ClassLoader at a very low rate, adds method-cluster telemetry, keeps entries that appear above a frequency threshold, and feeds a human-readable profile to profgen. The inclusion threshold started at 80–90% of traces to limit code-size and memory-pressure costs, since compiled code is about 10x larger than dex. It has since dropped to 20%, and profiles now hold tens of thousands of entries.

  • Sentry’s Native SDK gets its own crash backend (and more)

    Sentry mediumAdept

    Sentry Native SDK 1.0 replaces Google's Crashpad with Sentry's own out-of-process "Native" crash backend on desktop, built on the SDK's events, envelopes, hooks and transport so crashes can be reported as events, minidumps or both. The same backend enables out-of-process crash reporting at crash time on Xbox (opt-in) and experimentally on Android 11+, including Android tombstone enrichment, and coexists with Windows Error Reporting. Copy-on-write scope data, read/write locks, a shared telemetry worker pool and incremental IPC scope sync make log capture from 32 threads over 20x faster and tag updates over 10x faster. The 0.x line also added scopes per unit of work, HTTP retry with backoff, offline caching, experimental app-hang detection and Session Replay.

The quest for software engineering knowledge.

Look:
Layout: