Introduction
Memfault is a full device monitoring solution that can be integrated into any AOSP device. SDKs are available for Android 8-14. Running a different version of Android? Let us know!
What does Memfault do?​
See Features for a complete guide to all of the data that the Android SDK can collect.
- Using the Android SDK (source), data is captured at a configurable interval and automatically uploaded to Memfault. Data can be captured by configuring individual data sources for fine-grained data collection, as well as via bug reports for large snapshots of diagnostic information.
- Kernel panics, tombstones, Java Exceptions, ANRs, WTFs, SELinux policy violations, and other traces are extracted, intelligently grouped together into Issues, and displayed in a searchable dashboard. Alerts can let you know when problems are detected, such as when a metric exceeds a certain threshold. Memfault can also symbolicate native traces and deobfuscate Android traces.
- Interactive, zoomable timeline charts are provided to view system and custom metrics over time, including battery, Wi-Fi, Bluetooth, and activity manager events. These metrics can be viewed per device to understand the state of the device retroactively, and also across the entire fleet to spot key trends.
- Logs from logcat and dmesg are parsed, merged and displayed in a searchable interface alongside issues.
Overview​
Memfault provides the Android SDK, a customizable SDK that can be easily integrated into your Android build.
Once integrated, it can collect detailed diagnostics from the entire operating system to provide diagnostics and telemetry on everything from low-level hardware or kernel issues to high-level application crashes.
The Android SDK's behavior is driven by the Bort application; it schedules and requests the diagnostics information, then processes the results and uploads then to the cloud when the device is online. The Bort application is easily configurable to collect more or less data depending on your use case, and can be updated by pushing a new APK --- no OS update is required.
The Usage Reporter is a companion system application that provides a mechanism for Bort to collect diagnostics information. It can use either the Memfault Caliper system, or bug reports, or both, depending on how the Bort application is configured.
For a detailed integration guide, see the AOSP Integration Guide.
To quickly preview Memfault on your own Android development device, see the Android Quickstart APK.
To symbolicate native and ANR traces, as well as deobfuscate Android traces, Memfault provides a CLI tool that can be integrated into your build system to upload the required symbols and mappings, respectively. See Uploading Symbol Files for more information.
The Bort SDK contains built-in support for collecting many Android system metrics. To track additional or metrics on your platform, see our guide on Collecting Metrics.
How is Memfault different?​
- Many existing Android observability solutions only provide analytics for a single app running on a device. Memfault's Android SDK is part of the AOSP build, which allows it to gather data from all applications on the device, even from apps and services not under your control (provided by AOSP), and with configurable permissions levels depending on your tolerance.
- Many existing Android observability solutions only collect a single app's
logcat logs and a single app's crashes. Memfault provides access to more kinds
of data, across every application on the device, including pre-installed apps
and native services:
- Logcat logs, including kernel, system, and event logs
- Crashes (Exceptions, Tombstones, WTFs, ANRs)
- OS errors (kernel oopses, SELinux violations, unexpected reboots)
- Metrics about the device (per-app and total network usage, per-app and total device battery drain, disk space utilization, and more).
- Existing observability solutions are mostly focused on crashes. Memfault
offers metrics in addition to crash monitoring, which allows for comparisons
of data beyond only crashes.
- Memfault can be used to understand fleet performance over time, and over different releases. Metrics can be charted by release, to understand regressions in performance or confirm that a fix has rolled out. This is particularly helpful alongside Memfault's OTA solution.
- Metrics can be used to get a fuller picture of the performance of a single device. All metrics collected on a device can be visualized on a single timeline, alongside any crashes, which helps focus the debugging effort on the specific device that's experiencing issues.
- Memfault has multiple layers of optimizations to reduce the total amount of data uploaded, to be considerate of the device's bandwidth. Data is only uploaded at configurable hourly intervals, with configurable settings to wait for favourable network conditions. Logcat logs are only uploaded if they are potentially relevant to an issue. Instead of collecting an Android bugreport that can be several MB in size, Memfault can collect much of the same data using metrics, with many settings to turn off data that isn't important to your product.