Crash analytics

On this page 7

Crash analytics is the practice of automatically collecting, symbolicating, grouping and analyzing crash reports from apps running on real user devices, so that developers can find and fix the defects that terminate them. In mobile performance it turns thousands of individual failures into a ranked list of distinct problems, each with a stack trace, device context and a measure of how many users it affects.

Crash analytics complements laboratory testing. No test suite covers every device model, operating system version, memory condition and network state found in the field, so production crash data is the most reliable picture of an app’s real stability.

How crash analytics captures and processes crashes

Crash analytics works through a reporting SDK or system service that detects an abnormal termination, records the state of the app at that moment and uploads the report on the next launch or when connectivity allows. The backend then turns raw reports into readable, grouped issues.

The pipeline usually has five stages, summarized below.

StageWhat happensKey detail
DetectionA signal handler or exception hook catches the failureCovers uncaught exceptions and native signals
CaptureStack traces of all threads and device context are savedMust use minimal, crash-safe code
UploadThe report is sent on next launch or in the backgroundDelayed reports are normal
SymbolicationMemory addresses are mapped back to functions and linesRequires dSYM, mapping or symbol files
GroupingSimilar crashes are merged into one issueBased on the top relevant stack frames
Stages of a crash analytics pipeline

Symbolication is the step most often broken in practice. Release builds are optimized and often obfuscated, so without the matching dSYM files on iOS, R8 or ProGuard mapping files on Android and native symbol files for C or C++ code, reports show only addresses or obfuscated names that cannot be traced to source code.

Key crash analytics metrics

The central metrics in crash analytics express stability as a share of users or sessions free of crashes, because raw crash counts grow with the size of the user base and say little on their own.

MetricDefinitionTypical target for mature apps
Crash-free usersShare of daily users with no crashOften above 99 percent, higher for critical apps
Crash-free sessionsShare of sessions ending without a crashOften above 99.5 percent
User-perceived crash rateShare of daily users seeing a visible crashAndroid vitals flags rates above about 1.09 percent
Issue velocityGrowth of a specific issue after a releaseUsed to detect regressions quickly
Affected versionsApp and OS versions where an issue appearsShows whether a fix has worked
Common stability metrics and how to read them

Targets vary by category. A banking or health app may treat anything below 99.9 percent crash-free users as a problem, while a complex game with heavy native code may operate at a lower level. Trends after each release matter more than the absolute number.

Crash analytics covers terminations of the app, but users also abandon apps that freeze or start slowly. Mature monitoring therefore combines crashes with other mobile performance signals such as ANR reports and app startup time.

SignalWhat it detectsTypical data
CrashProcess terminated by an errorStack traces, exception type, device state
ANRAndroid main thread blocked for about five secondsMain thread trace at the time of the freeze
App hangiOS main thread unresponsiveHang duration and stack samples
Out-of-memory terminationSystem kills the app for memory useOften inferred, no full stack trace
Non-fatal errorCaught exception logged by the appCustom logs and keys
Crash analytics and neighboring mobile performance signals

Out-of-memory and watchdog terminations deserve special attention, because the operating system often kills the process without giving the app a chance to write a normal crash report. Many tools infer them indirectly, which makes their numbers less precise than true crash counts.

Using crash analytics to prioritize fixes

Effective crash analytics turns data into prioritized engineering work. Teams rank issues by the number of affected users, the importance of the affected flow and whether the issue is new in the latest release.

  • Upload symbol files automatically in the build pipeline for every release build.
  • Add breadcrumbs and custom keys, such as the current screen or feature flag, to explain context.
  • Alert on regressions when a new issue grows quickly after a staged rollout begins.
  • Pause a staged rollout when a release introduces a severe crash in a core flow.
  • Exclude personal data from logs and keys to respect privacy rules.

Crash analytics works especially well with staged rollouts. Releasing to a small percentage of users first lets the team see new crash clusters early and stop the rollout before most users are affected.

Limitations and common pitfalls of crash analytics

Crash analytics shows where an app failed, not always why. The crashing line is often only the place where corrupted state finally caused a failure, while the actual cause happened earlier on another thread or in another component.

  • Missing symbols leave reports unreadable and can split one problem into many issues.
  • Overly broad grouping hides several different bugs under one generic system frame.
  • Sampling or opt-out means reported numbers are estimates of total crashes.
  • Multiple crash reporters in one app can interfere with each other’s signal handlers.

Crash reports can also contain personal or sensitive data in logs, screen names or custom keys. Under privacy regulations, crash analytics must be covered by the app’s privacy disclosures, and teams should review what each report collects before enabling detailed logging in production builds.

Put simply

Crash analytics is like a black box recorder for apps. When an app suddenly closes on someone’s phone, a small report is saved. It notes what the app was doing and on which device it happened.

Reports from thousands of phones are collected and sorted into groups. Developers then see which problems hurt the most people and fix those first. Without it, they would only know about crashes that users bother to report.

In practice

A food delivery app releases a new version to 10 percent of Android users through a staged rollout. Within hours, the crash analytics dashboard shows a new issue growing fast, and the crash-free users rate drops from about 99.8 percent to 99.1 percent in that group.

The symbolicated stack trace points to the checkout screen, and the attached custom keys show that every affected device runs an older Android version with a specific payment option selected. The team halts the rollout, fixes a missing null check in the payment code and ships a patched build the next day. Stability returns to its previous level before the release reaches most users.