Android SDK Built-in Metrics
The Android SDK contains built-in support for collecting many different types of metrics from Android devices.
Most built-in metrics can be enabled, disabled, and additionally configured in Memfault dashboard, under Settings → Data Sources. Additional setup in the Memfault dashboard, under Settings → Metrics, may be necessary to set the metrics as Attributes (for use of the metric in Search and Device Sets) or Timeseries (for use of the metric in Metric charts and Device Sets).
Memfault will automatically configure certain metrics as Timeseries or Attributes and set a value range upon creation, but these can changed in the same view.
Some metrics are only visible as High-Resolution Telemetry, which allows for fine-grained observability of a single Device, but no aggregation or search across multiple devices.
Many HRT-only metrics will have a counterpart aggregate Heartbeat Metric.
Memfault will also add new built-in metrics, and improve existing metrics over time, with newer SDK versions.
Custom Metrics
Support for custom metrics is available with Memfault's Reporting API. This enables capturing domain specific metrics that Memfault wouldn't know about otherwise. Most built-in metrics are captured using the same Memfault Reporting API.
Crash Metrics
Collected since Android SDK 5.3.0
| Metric | Description | Usage |
|---|---|---|
drop_box_(.*)_count | Number of dropbox entries received by type (one of anr|exception|wtf|native|kmsg|panic). | Track crashes or errors by type. |
operational_crashes | Number of crashes captured. | Track crashes. |
operational_crashes_(.*) | Number of crashes captured, by app/process group. | Track crashes, for specific apps/processes. |
Battery Stats Metrics

Batterystats is periodically parsed and displayed in HRT according to the output code from the batterystats source.
Some Batterystats metrics are aggregated so they can also be used in Heartbeats for Fleet-wide insights.
| Metric | Description | Usage | HRT only |
|---|---|---|---|
wakelock | BatteryStats “w” key. | ✔️ | |
wake_lock_on_ratio | Percent (0-1%) of time the CPU was running. | Segment battery drain investigations by wake locks. | |
cpu_running | BatteryStats “r” key. | ✔️ | |
cpu_running_ratio | Percent (0-1%) of time the CPU was running. | Segment battery drain investigations by CPU activity. | |
cpu_resume_count_per_hour | CPU resume rate (per hour). | ||
cpu_suspend_count_per_hour | CPU suspend rate (per hour). | ||
battery_level | BatteryStats “Bl” key. | ✔️ | |
battery_level_pct_avg | Average battery level this heartbeat. Calculated as the arithmetic average of all battery level readings. | ||
battery_charge_rate_first_80_percent_pct_per_hour_avg | Charging rate (% per hour), while the battery level is under 80% to exclude trickle charging. | Track the rate of charge. | |
battery_temperature | BatteryStats “Bt” key. | ✔️ | |
max_battery_temp | Max reading of the Battery temperature. | ||
battery_voltage | BatteryStats “Bv” key. | ✔️ | |
min_battery_voltage | Minimum reading of the Battery voltage. | Identify periods of low battery voltage. Indicates battery undervoltage or battery miscalibration issues. | |
battery_coulomb_charge | BatteryStats “Bcc” key. | ✔️ | |
battery_health | BatteryStats “Bs” key. One of: Good, Overheat, Dead, OverVoltage, Failure, Cold. | ✔️ | |
battery_health_not_good_ratio | Percent (0-1%) of time spent outside of the “Good” Battery Health state. | Identify devices with battery problems. | |
battery_status | BatteryStats “Bs” key. | ✔️ | |
battery_charge_duration_ms | Amount of time spent in the "Charging” Battery Status state. | ||
battery_discharge_duration_ms | Amount of time spent in the "Discharging” Battery Status state. | ||
battery_plug | BatteryStats “Bp” key. | ✔️ | |
battery_plugged | BatteryStats “BP” key. | ✔️ | |
charging | BatteryStats “ch” key. | ✔️ | |
audio | BatteryStats “a” key. | ✔️ | |
audio_on_ratio | Percent (0-1%) of time spent with Audio active. | Segment battery drain investigations by audio activity. | |
camera | BatteryStats “ca” key. | ✔️ | |
camera_on_ratio | Percent (0-1%) of time spent with the camera active. | Segment battery drain investigations by camera use. | |
video | BatteryStats “v” key. | ✔️ | |
video_on_ratio | Percent (0-1%) of time spent with video running. | Segment battery drain investigations by video use. | |
sensor | BatteryStats “s” key. | ✔️ | |
gps_on | BatteryStats “g” key. | ✔️ | |
gps_on_ratio | Percent (0-1%) of time spent with GPS active. | Segment battery drain investigations by GPS activity. | |
gps_signal_strength | BatteryStats “Gss” key. | ✔️ | |
screen_on | BatteryStats “S” key. | ✔️ | |
screen_on_ratio | Percent (0-1%) of time spent with Screen on. | Segment battery drain investigations by Screen use. | |
screen_brightness | BatteryStats “Sb” key. | ✔️ | |
screen_brightness_light_or_bright_ratio | Percent (0-1%) of time spent with the Screen Brightness at Light or Bright (40% of the maximum brightness, 5 buckets). | Segment battery drain investigations by Screen brightness. | |
wifi_on | BatteryStats “W” key. | ✔️ | |
wifi_on_ratio | Percent (0-1%) of time spent with the Wi-Fi on. | Segment battery drain investigations by Wi-Fi activity. | |
wifi_full_lock | BatteryStats “Wl” key. | ✔️ | |
wifi_full_lock_ratio | Percent (0-1%) of time spent with a full Wi-Fi wake lock acquired. | Segment battery drain investigations by Wi-Fi activity. | |
wifi_scan | BatteryStats “Ws” key. | ✔️ | |
wifi_scan_ratio | Percent (0-1%) of time spent with the Wi-Fi scanning. | Segment battery drain investigations by Wi-Fi activity. | |
wifi_multicast | BatteryStats “Wm” key. | ✔️ | |
wifi_radio | BatteryStats “Wr” key. | ✔️ | |
wifi_radio_active_ratio | Percent (0-1%) of time spent with Wi-Fi radio active. | Segment battery drain investigations by Wi-Fi activity. | |
wifi_running | BatteryStats “Ww” key. | ✔️ | |
wifi_signal_strength | BatteryStats “Wss” key. | ✔️ | |
wifi_signal_strength_poor_or_very_poor_ratio | Percent (0-1%) of time spent with the Wi-Fi signal strength at “Poor” or “Very Poor” (40% of the minimum strength, 5 buckets). | Identify periods of poor network reliability. Segment battery drain investigations by Wi-Fi activity. | |
wifi_supplicant | BatteryStats “Wsp” key. | ✔️ | |
power_save | BatteryStats “ps” or “lp” key. | ✔️ | |
doze | BatteryStats “di” key. | ✔️ | |
doze_full_ratio | Percent (0-1%) of time spent with the Device Idle state at “Full”. | Segment battery drain investigations by Doze. | |
doze_ratio | Percent (0-1%) of time spent with the Device Idle state at “Full” or “Light”. | Segment battery drain investigations by Doze. | |
user | BatteryStats “Eur” key. | ✔️ | |
user_foreground | BatteryStats “Euf” key. | ✔️ | |
job | BatteryStats “Ejb” key. | ✔️ | |
package_install | BatteryStats “Epi” key. | ✔️ | |
package_install_count | Number of packages installed this period. | Identify periods of high package manager activity. | |
package_uninstall | BatteryStats “Epu” key. | ✔️ | |
device_active | BatteryStats “Eac” key. | ✔️ | |
bluetooth_le_scanning | BatteryStats “Etp” key. | ✔️ | |
bluetooth_scan_ratio | Percent (0-1%) of time spent with the Bluetooth scanning. | Segment battery drain investigations by Bluetooth activity. | |
phone_radio | BatteryStats “Pr” key. | ✔️ | |
phone_radio_active_ratio | Percent (0-1%) of time spent with the Phone radio active. | Segment battery drain investigations by Phone Radio activity. | |
phone_connection | BatteryStats “Pcn” key. | ✔️ | |
phone_connection_latest | Latest cellular connection technology (oos, gprs, edge, umts, cdma, evdo_0, evdo_A, 1xrtt, hsdpa, hsupa, hspa, iden, evdo_b, lte, ehrpd, hspap, gsm, td_scdma, iwlan, lte_ca, nr, emngcy, other). | ||
phone_in_call | BatteryStats “Pcl” key. | ✔️ | |
phone_in_call_ratio | Percent (0-1%) of time spent in a phone call. | Segment battery drain investigations by Phone Call activity. | |
phone_scanning | BatteryStats “Psc” key. | ✔️ | |
phone_scanning_ratio | Percent (0-1%) of time spent with the Phone radio scanning | Segment battery drain investigations by Phone activity. | |
phone_signal_strength | BatteryStats “Pss” key. | ✔️ | |
phone_signal_strength_none_ratio | Percent (0-1%) of time spent with the Phone radio signal strength at “None”. | Identify periods of poor network reliability. | |
phone_signal_strength_poor_ratio | Percent (0-1%) of time spent with the Phone radio signal strength at “Poor”. | Identify periods of poor network reliability. | |
phone_state | BatteryStats “Pst” key. | ✔️ | |
phone_state_in_ratio | Percent (0-1%) of time spent with the phone registered with an operator. | ||
phone_state_out_ratio | Percent (0-1%) of time spent with the phone not registered to any operator. | Identify periods of poor network connectivity. | |
phone_state_em_ratio | Percent (0-1%) of time spent with the phone registered and locked for emergency use only. | ||
top_app | BatteryStats “Etp” key. | ✔️ | |
foreground | BatteryStats “Efg” key. | ✔️ | |
longwake | BatteryStats “Elw” key. | ✔️ | |
long_wake_lock_on_ratio | Percent (0-1%) of time spent with a Long running wake lock acquired. | Segment battery drain investigations by wake locks. | |
alarm | BatteryStats “Eal” key. | ✔️ | |
start | BatteryStats “START” or “SHUTDOWN”. | ✔️ | |
screen_doze | BatteryStats “Sd” key. | ✔️ | |
flashlight | BatteryStats “fl” key. | ✔️ | |
flashlight_on_ratio | Percent (0-1%) of time spent with the flashlight on. | Segment battery drain investigations by flashlight use. | |
bluetooth | BatteryStats “b” key. | ✔️ | |
bluetooth_on_ratio | Percent (0-1%) of time spent with Bluetooth on. | Segment battery drain investigations by Bluetooth drain. | |
usb_data | BatteryStats “Ud” key. | ✔️ | |
usb_data_on_ratio | Percent (0-1%) of time spent with an USB data connection active. | ||
cellular_high_tx_power | BatteryStats “Chtp” key. | ✔️ | |
cellular_high_tx_power_on_ratio | Percent (0-1%) of time spent using high cellular TX power. | Segment battery drain investigations by high cellular impact. | |
nr_state | BatteryStats “nrs” key. | ✔️ | |
nr_state_none_ratio | Percent (0-1%) of time spent with no LTE cell. | Segment battery drain investigations by cellular connectivity. Identify poor network connectivity. | |
nr_state_restricted_ratio | Percent (0-1%) of time spent with an LTE cell, but the device is restricted from its use. | Segment battery drain investigations by cellular connectivity. Identify poor network connectivity. | |
nr_state_not_restricted_ratio | Percent (0-1%) of time spent with an LTE cell available for use, but has not connected. | Segment battery drain investigations by cellular connectivity. Identify poor network connectivity. | |
nr_state_connected_ratio | Percent (0-1%) of time spent actively connected to an LTE cell. | Segment battery drain investigations by cellular connectivity. Identify poor network connectivity. | |
screen_wake | BatteryStats “Esw” key. | ✔️ | |
screen_wake_count | Number of screen wake events. |
Battery Metrics
| Metric | Description | Usage |
|---|---|---|
battery_discharge_duration_ms | Time spent with the battery discharging. Calculated by the time spent in the BatteryStats Battery Status (“Bs”) Discharging (“d”) state. | |
battery_charge_duration_ms | Time spent charging the battery. Calculated by the time spent in the BatteryStats Battery Status (“Bs”) Charging (“c”) state. | |
battery_soc_pct_drop | Battery discharged (in whole %). Calculated as the drop in the BatteryStats Battery Level (“Bl”) value. | Identify devices with periods of large battery drain. |
battery_soc_pct_rise | Battery charge gained (in whole %). Calculated as the rise in the BatteryStats Battery Level (“Bl”) value. | |
battery_charge_rate_pct_per_hour_avg | Charging rate (0-100% per hour), when charging. Calculated by dividing the battery_soc_pct_rise by battery_charge_duration_ms, adjusted to a per hour rate. | |
battery_discharge_rate_pct_per_hour_avg | Discharge rate (-100-0% per hour), when discharging. Calculated by dividing the battery_soc_pct_drop by battery_discharge_duration_ms, adjusted to a per hour rate. | |
screen_on_battery_drain_%/hour | Battery drain (0-100% per hour), while the screen was on. Calculated as the BatteryStats Discharge Data (”dc”) total drain counter subtracted by the screen off drain counter, divided by the estimated_battery_capacity_mah, adjusted to a per hour rate. | Buggy - Check units uah vs mah |
screen_off_battery_drain_%/hour | Battery drain (0-100% per hour), while the screen was off. Calculated as the BatteryStats Discharge Data (”dc”) screen off drain counter divided by the estimated_battery_capacity_mah, adjusted to a per hour rate. | Buggy - Check units uah vs mah |
battery_screen_on_discharge_duration_ms | Time spent with the battery discharging while the screen was on. Calculated from the BatteryStats Battery (“Bt”) realtime value minus screen off realtime. | |
battery_screen_on_soc_pct_drop | Battery drain (0-100%), while the screen was on. Calculated as the BatteryStats Discharge Data (”dc”) total drain counter subtracted by the screen off drain counter, divided by the estimated_battery_capacity_mah. | Buggy - Check units uah vs mah |
battery_screen_off_discharge_duration_ms | Time spent with the battery discharging while the screen was of. Calculated from the BatteryStats Battery (“Bt”) screen off realtime value. | |
battery_screen_off_soc_pct_drop | Battery drain (0-100%), while the screen was off. Calculated as the BatteryStats Discharge Data (”dc”) screen off drain counter divided by the estimated_battery_capacity_mah. | Buggy - Check units uah vs mah |
battery_use_%/hour_(.*) | Battery usage by component (0-100%). There are 2 different kinds of components: Android-specific power components, and process components. Only usage over 0.01% is recorded. | Track the relative battery usage between different components and apps/processes. |
battery_use_top_component_name | Name of the component with the highest battery usage that period. | |
battery_use_top_component_pct | Percent usage of the component with the highest battery usage that period. | |
estimated_battery_capacity_mah | Returns the estimated real battery capacity, which may be less than the capacity declared by the PowerProfile (for example, because of battery aging). Calculated as the capacity declared in the PowerProfile by default, and updated by dividing the charge counter by the battery level. | |
original_battery_capacity_mah | Returns the best known estimate of the battery capacity. Calculated as taking the learned battery capacity, or the min learned battery capacity, else falling back to the estimated battery capacity. | Identify discrepancies in the calculated battery capacity versus the actual expected battery capacity. |
computed_battery_capacity_mah | Returns the total amount of battery charge drained since the last BatteryStats reset. | |
min_battery_capacity_mah | Returns the minimum range of discharged power since the last BatteryStats reset. | |
max_battery_capacity_mah | Returns the maximum range of discharged power since the last BatteryStats reset. | |
battery_state_of_health_% | Health of the battery, as estimated_battery_capacity_mah divided by original_battery_capacitiy_mah. | |
battery.charge_cycle_count.latest | Value of the battery charging cycle count. | Track devices with high charge cycle counts. Preemptively account for battery drain issues. |
Per-component battery usage is displayed on Timeline. The usage (in % per hour)
for component app which used >= 0.01% is shown as follows:

- This is shown in the
Battery Usage %/hourswimlane as shown in the screenshot, with separate entries for each component. Components is grouped into Android OS components (e.g.cell,idle,android,screen,bluetooth,gnss) and applications/processes (e.g.com.google.android.youtube,com.android.vending,com.whatsapp).
Connectivity Metrics
The Android SDK collects metrics tracking connectivity changes on the Device.
| Metric | Description | Usage | HRT only |
|---|---|---|---|
airplane_mode | Checks whether Airplane Mode was enabled. Derived from Settings.Global.AIRPLANE_MODE_ON. Renamed to connectivity.airplane_mode in Bort 5.5.0. | ✔️ | |
connectivity.airplane_mode | Checks whether Airplane Mode was enabled. Derived from Settings.Global.AIRPLANE_MODE_ON. | ||
connectivity.internet | Checks whether Internet connectivity was detected on the connected network. | ||
connectivity.validated | Checks whether the connectivity on the connected network was successfully validated. Derived from NetworkCapabilities.NET_CAPABILITY_VALIDATED. | ||
connectivity.captive_portal | Checks whether the connectivity on the connected network was found to have a captive portal in place. Derived from NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL. | ||
connectivity.roaming | Checks whether the connected network is roaming. Derived from NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING. | ||
connectivity.unmetered_temporarily | Checks whether the connected network is temporarily unmetered. Derived from NetworkCapabilities.NET_CAPABILITY_TEMPORARILY_NOT_METERED. | ||
connectivity.metered | Checks whether the connected network is metered. Derived from NetworkCapabilities.NET_CAPABILITY_NOT_METERED. | ||
connectivity.ip_version.latest | Records support for IPv4 or IPv6 from the connected Wi-Fi network. | ||
connectivity.ipv4_status.latest | Records the IPv4 connectivity of the connected Wi-Fi network. | ||
connectivity.ipv6_status.latest | Records the IPv6 connectivity of the connected Wi-Fi network. | ||
connectivity.wifi.rssi.moving_avg | Records the RSSI of the connected Wi-Fi network as a exponential moving average of the dBm. | ||
connectivity.wifi.roaming_count | Count of Wi-Fi roaming events (same SSID, different AP BSSID). | ||
connectivity.wifi.channel_hop_count | Count of Wi-Fi channel hop events (same SSID, different frequencies). | ||
connectivity.wifi.frequency | Records the reported frequency of the connected Wi-Fi network. | ||
connectivity.wifi.frequency_band | Records the reported frequency band (2.4, 5, 6” of the connected Wi-Fi network. | ||
connectivity.wifi.scan_network_count.(count|mean) | Records the number of networks found from the Wi-Fi scan. StatsD “WifiScanReported” key. | ||
connectivity.wifi.ap_oui | Records the Wi-Fi OUI of the currently connected access point. The manufacturer of the connected AP will be synthesized in the “wifi_ap_oui_vendor” metric. | Track the network topology when devices have poor Wi-Fi performance. | |
wifi_disconnect_session | Synthesizes a Wi-Fi session and various parameters based off of the StatsD “WifiDisconnectReported” key. |
Uptime Metrics
The connectivity type matches the transport types returned from the Android NetworkCapabilities#hasTransport API.
| Metric | Description | Usage | HRT only |
|---|---|---|---|
connectivity.type_(.*).secs/hour | Rate of time (seconds per hour) connected to the type of connectivity (one of NONE|ETHERNET|CELLULAR|WIFI|VPN|USB|UNKNOWN). | Segment investigations by connectivity type. | |
connectivity.type_(.*).total_secs | Absolute time (seconds) connected to the type of connectivity (one of NONE|ETHERNET|CELLULAR|WIFI|VPN|USB|UNKNOWN). | ||
connectivity.type_(.*).mean_time_in_state_ms | Average time (seconds) spent connected to the type of connectivity (one of NONE|ETHERNET|CELLULAR|WIFI|VPN|USB|UNKNOWN). |
Wi-Fi Metrics
Collected since Android SDK 5.4.0
If the Device is connected to a Wi-Fi network, additional Wi-Fi metrics can be collected.
| Metric | Description | Usage | HRT only |
|---|---|---|---|
connectivity.wifi.frequency.latest | Returns the frequency of the connected Wi-Fi network, if available. | ||
connectivity.wifi.link_speed_mbps.latest | Returns the link speed (in Mbps) of the connected Wi-Fi network, if available. | ||
connectivity.wifi.standard_version.latest | Returns the standard of the connected Wi-Fi network, if available (Android 11+). | ||
connectivity.wifi.security_type.latest | Returns the security type of the connected Wi-Fi network, if available (Android 12+). | ||
connectivity.wifi.lost_tx_packets_per_second.latest | Average rate of lost transmitted packets (packets per second). | Identify devices with poor network reliability. | |
connectivity.wifi.retried_tx_packets_per_second.latest | Average rate of transmitted retry packets (packets per second). | Identify devices with poor network reliability. | |
connectivity.wifi.successful_tx_packets_per_second.latest | Average rate of successfully transmitted unicast packets (packets per second). | ||
connectivity.wifi.successful_rx_packets_per_second.latest | Average rate of received unicast data packets (packets per second). | ||
connectivity.ip_version.latest | Records support for IPv4 or IPv6 from the connected Wi-Fi network. | ||
connectivity.ipv4_status.latest | Records the IPv4 connectivity of the connected Wi-Fi network. | ||
connectivity.ipv6_status.latest | Records the IPv6 connectivity of the connected Wi-Fi network. | ||
connectivity.wifi.rssi.moving_avg | Records the RSSI of the connected Wi-Fi network as a exponential moving average of the dBm. | ||
connectivity.wifi.roaming_count | Count of Wi-Fi roaming events (same SSID, different AP BSSID). | ||
connectivity.wifi.channel_hop_count | Count of Wi-Fi channel hop events (same SSID, different frequencies). | ||
connectivity.wifi.frequency | Records the reported frequency of the connected Wi-Fi network. | ||
connectivity.wifi.frequency_band | Records the reported frequency band (2.4, 5, 6” of the connected Wi-Fi network. | ||
connectivity.wifi.scan_network_count.(count|mean) | Records the number of networks found from the Wi-Fi scan. StatsD “WifiScanReported” key. | ||
connectivity.wifi.ap_oui | Records the Wi-Fi OUI of the currently connected access point. The manufacturer of the connected AP will be synthesized in the “wifi_ap_oui_vendor” metric. | Track the network topology when devices have poor Wi-Fi performance. | |
wifi_disconnect_session | Synthesizes a Wi-Fi session and various parameters based off of the StatsD “WifiDisconnectReported” key. |
Network Bandwidth
Collected since Android SDK 4.15.0, Updated in SDK 5.2.0
The Android SDK will record the total network usage on the Device every
Heartbeat period using Android's NetworkStatsManager APIs. These are always
recorded in every Heartbeat report.
The Android SDK will also record the network usage on the Device by the specific
type of connectivity (WIFI, ETHERNET, MOBILE, or BLUETOOTH), if the
value is greater than zero for that Heartbeat period.
Finally, the Android SDK can also collect per-app network usage for every app on the Device that exceeds the specified threshold (1MB by default). These are only visible in HRT, on the Device Timeline.
| Metric | Description | Usage |
|---|---|---|
connectivity_recv_bytes | Total data received from the network (bytes). | Track the network usage of the device. |
connectivity_sent_bytes | Total data sent through the network (bytes). | Track the network usage of the device. |
connectivity_(bt|wifi|mobile|eth)_(recv|sent)_bytes | Total data received/sent through the network for the type of connectivity (bytes). | Track the type of network usage of the device. |
connectivity_comp_(.*)_(recv|sent)_bytes | Total data received/sent through the network by the specific component (bytes). | Identify apps/proccesses with higher than expected network usage. |
connectivity_comp_(.*)_(bt|wifi|mobile|eth)_(recv|sent)_bytes | Total data received/sent through the network for the type of connectivity by the specific component (bytes). |
Bluetooth Metrics
| Metric | Description | Usage |
|---|---|---|
bluetooth.ble_scan_result.count.latest | Records number of devices found in the BLE scan. StatsD “BleScanResultReceived” key. | |
bluetooth.ble_scan_result.attribution.latest | Records the caller of the associated BLE scan. StatsD “BleScanResultReceived” key. | |
bluetooth.device_rssi.(min|mean|max) | Records the reported RSSI of the Bluetooth device. StatsD “BluetoothDeviceRssiReported” key. | |
bluetooth.device_rssi.device_id.latest | Records the device id of associated RSSI report. StatsD “BluetoothDeviceRssiReported” key. | |
bluetooth.device_tx_power_level.(min|mean|max) | Records the reported TX power level of the Bluetooth device. StatsD “BluetoothDeviceTxPowerLevelReported” key. | |
bluetooth.device_tx_power_level.device_id | Records the device id of associated TX power level report. StatsD “BluetoothDeviceTxPowerLevelReported” key. | |
bluetooth.quality_report.rssi.(min|mean|max) | Records the reported RSSI from the Bluetooth Link Quality Report event from the controller. StatsD “BluetoothQualityReportReported” key. | |
bluetooth.quality_report.snr.(min|mean|max) | Records the reported SNR from the Bluetooth Link Quality Report event from the controller. StatsD “BluetoothQualityReportReported” key. | |
bluetooth.quality_report.retransmission_count.(mean|max|sum) | Records the reported retransmission count from the Bluetooth Link Quality Report event from the controller. StatsD “BluetoothQualityReportReported” key. | |
bluetooth.quality_report.reported | Records the Bluetooth Link Quality Report event from the controller. StatsD “BluetoothQualityReportReported” key. |
Storage Metrics
The Android SDK regularly collects Device storage usage metrics from Android's Environment.getDataDirectory API.
| Metric | Description | Usage |
|---|---|---|
storage_used_pct | Percent (0-100%) of free space in the user data directory. | Identify devices that may be running out of space. Preemptively account for low space issues. |
storage.data.percentage_used.latest | Deprecated. Percent (0-1%) of free space in the user data directory. | |
storage.data.bytes_free.latest | Amount of free space in the user directory (bytes). | |
storage.data.bytes_used.latest | Amount of used space in the user directory (bytes). | |
storage.data.bytes_total.latest | Total storage available in the user directory (bytes). |
Temperature Metrics
Updated in SDK 5.2.0
The Android SDK regularly collects several device temperature metrics, from Android's HardwarePropertiesManager. This allows the SDK to collect the CPU and device skin temperatures programmatically.
The temperatures are reported with min/max/mean values each hour. Note that each device has a different collection of sensors — an example device with one device skin sensor and two CPU sensors might have a set of metrics like this.
- Device Skin Sensor A
thermal_skin_A_cthermal_skin_A_c_max
- CPU Sensor 1
thermal_cpu_1_cthermal_cpu_1_c_max
- CPU Sensor 2
thermal_cpu_2_cthermal_cpu_2_c_max
| Metric | Description | Usage |
|---|---|---|
thermal_cpu_c | Average temperature (Celsius) of all CPU sensors. | Track the average CPU temperature of the device. |
thermal_cpu_c_max | Max temperature (Celsius) of all CPU sensors. | Identify devices with high CPU temperature readings. |
thermal_battery_c | Average temperature (Celsius) of all Battery sensors. | Track the average Battery temperature of the device. |
thermal_battery_c_max | Max temperature (Celsius) of all Battery sensors. | Identify devices with high Battery temperature readings. |
thermal_(.*)_(.*)_c | Average temperature (Celsius) of the sensor by type and name. | Track the average temperature of the device by sensor. |
thermal_(.*)_(.*)_c_max | Max temperature (Celsius) of the sensor by type and name. | Identify devices with high temperature readings by sensor. |
thermal_status_(.*)_max | Max reading for the thermal mitigation status of the sensor by type and name. 3 and higher is severe. See https://source.android.com/docs/core/power/thermal-mitigation#codes. | Identify devices experiencing thermal throttling. |
Memory Metrics
| Metric | Description | Usage |
|---|---|---|
memory_pct | Average memory used by the system (0-100%), polled every 5 minutes by default. | Track the average memory usage of the device. |
memory_pct_max | Max memory used by the system (0-100%), polled every 5 minutes by default. | Identify periods of high memory usage. |
memory.low_mem_reported | Count of low memory events reported by the system server. StatsD “LowMemReported” key. | Track high memory pressure on the device. |
memory.lmk_kill_occurred | Report of process kill events by the low memory killer daemon. StatsD "LmkKillOccurred” key. | Track high memory pressure on the device. |
CPU Metrics
| Metric | Description | Usage |
|---|---|---|
cpu_usage_pct | Average CPU usage in the system. Collected by parsing /proc/stat for the total ticks minus the idle ticks this period. | Track the average CPU usage of the device. |
cpu_usage_(.*)_pct | Average CPU usage in the system, for the app/process. Collected by parsing /proc/<pid>/stat/ for system and user time (stime + utime) divided by the total usage (sum of all fields from /proc/stat). | Identify periods of high CPU usage. |
Disk Wear Metrics
| Metric | Description | Usage |
|---|---|---|
disk_wear.(.*).version | Flash EMMC/UFS version, as reported by the vendor implementation. | |
disk_wear.(.*).pre_eol | Pre-EOL information, overall status of consumed reserved blocks. | Track the disk wear of the device. Preemptively account for issues with failing flash. |
disk_wear.(.*).lifetime_remaining_pct | Estimate of how much of the type A flash is remaining, in increments of 10%. | Track the disk wear of the device. Preemptively account for issues with failing flash. |
disk_wear.(.*).lifetime_b_remaining_pct | Estimate of how much of the type B flash is remaining, in increments of 10%. | Track the disk wear of the device. Preemptively account for issues with failing flash. |
disk_wear.(.*).bytes_written | Count of bytes written to the (virtual) device. | Identify periods of high disk wear on the device. |
Disk Usage Metrics
| Metric | Description | Usage |
|---|---|---|
disk.slow_io_(read|write|unmap|sync|unknown)_24h_count | Log of slow I/O events on the primary storage. StatsD "SlowIo” key. |
USB Metrics
| Metric | Description | Usage |
|---|---|---|
usb.contaminant_reported | Checks for the presence of a USB contaminants. StatsD "UsbContaminantReported” key. | |
usb.devices | Tracks any connected USB devices via ACTION_USB_DEVICE_ATTACHED/DETACHED. | |
usb.accessories | Tracks any connected USB accessories via ACTION_USB_ACCESSORY_ATTACHED/DETACHED. |
Telephony Metrics
| Metric | Description | Usage |
|---|---|---|
phone.imei | This device’s IMEI number, if it exists. Collected via TelephonyManager. |
Installed App Versions
The Android SDK can collect installed app versions as metrics. These can be configured on the Memfault Settings Dashboard, on the Data Sources tab, by entering package names to collect:

Wildcards can be used, to collect multiple apps sharing the same package root.
Each collected version is stored as a Metric, prefixed with version.:

These metrics would be good candidates for Attributes, to enable e.g. searching for devices with a given app version installed, or checking the installed versions on a specific device.
System Properties
The Android SDK can collect Android System Properties. These can be configured on the Memfault Settings Dashboard, on the Data Sources tab, by entering each property to collect:

Each collected property is stored as a metric, prefixed with sysprop.:

These metrics would be good candidates for Attributes, to enable e.g. searching for devices with a given system property, or checking the properties for a specific device.
persist.sys.timezone is collected by default. This is used in the Memfault
dashboard to enable browsing in the device's time zone (ro.build.type is also
collected by default).