Skip to main content

Android SDK Built-in Metrics

The Android SDK contains built-in support for collecting many different types of metrics from Android devices.

Configuration

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.

Visibility

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​

MetricDescriptionUsage
drop_box_(.*)_countNumber of dropbox entries received by type (one of anr|exception|wtf|native|kmsg|panic).Track crashes or errors by type.
operational_crashesNumber of crashes captured.Track crashes.
operational_crashes_(.*)Number of crashes captured, by app/process group.Track crashes, for specific apps/processes.
operational_hoursNumber of hours the device was operational, tracked in 1-hour chunks.Denominator for the Stability Device Vital (crash-free hours percentage).
operational_crashfree_hoursNumber of operational hours in which no crash was captured, tracked in 1-hour chunks.Numerator for the Stability Device Vital (crash-free hours percentage).
batterystats 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.

MetricDescriptionUsageHRT only
wakelockBatteryStats “w” key.✔️
wake_lock_on_ratioPercent (0-1%) of time the CPU was running.Segment battery drain investigations by wake locks.
cpu_runningBatteryStats “r” key.✔️
cpu_running_ratioPercent (0-1%) of time the CPU was running.Segment battery drain investigations by CPU activity.
cpu_resume_count_per_hourCPU resume rate (per hour).
cpu_suspend_count_per_hourCPU suspend rate (per hour).
battery_levelBatteryStats “Bl” key.✔️
battery_level_pct_avgAverage battery level this heartbeat. Calculated as the arithmetic average of all battery level readings.
battery_charge_rate_first_80_percent_pct_per_hour_avgCharging rate (% per hour), while the battery level is under 80% to exclude trickle charging.Track the rate of charge.
battery_temperatureBatteryStats “Bt” key.✔️
max_battery_tempMax reading of the Battery temperature.
battery_voltageBatteryStats “Bv” key.✔️
min_battery_voltageMinimum reading of the Battery voltage.Identify periods of low battery voltage. Indicates battery undervoltage or battery miscalibration issues.
battery_coulomb_chargeBatteryStats “Bcc” key.✔️
battery_healthBatteryStats “Bs” key. One of: Good, Overheat, Dead, OverVoltage, Failure, Cold.✔️
battery_health_not_good_ratioPercent (0-1%) of time spent outside of the “Good” Battery Health state.Identify devices with battery problems.
battery_statusBatteryStats “Bs” key.✔️
battery_plugBatteryStats “Bp” key.✔️
battery_pluggedBatteryStats “BP” key.✔️
chargingBatteryStats “ch” key.✔️
audioBatteryStats “a” key.✔️
audio_on_ratioPercent (0-1%) of time spent with Audio active.Segment battery drain investigations by audio activity.
cameraBatteryStats “ca” key.✔️
camera_on_ratioPercent (0-1%) of time spent with the camera active.Segment battery drain investigations by camera use.
videoBatteryStats “v” key.✔️
video_on_ratioPercent (0-1%) of time spent with video running.Segment battery drain investigations by video use.
sensorBatteryStats “s” key.✔️
gps_onBatteryStats “g” key.✔️
gps_on_ratioPercent (0-1%) of time spent with GPS active.Segment battery drain investigations by GPS activity.
gps_signal_strengthBatteryStats “Gss” key.✔️
screen_onBatteryStats “S” key.✔️
screen_on_ratioPercent (0-1%) of time spent with Screen on.Segment battery drain investigations by Screen use.
screen_brightnessBatteryStats “Sb” key.✔️
screen_brightness_light_or_bright_ratioPercent (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_onBatteryStats “W” key.✔️
wifi_on_ratioPercent (0-1%) of time spent with the Wi-Fi on.Segment battery drain investigations by Wi-Fi activity.
wifi_full_lockBatteryStats “Wl” key.✔️
wifi_full_lock_ratioPercent (0-1%) of time spent with a full Wi-Fi wake lock acquired.Segment battery drain investigations by Wi-Fi activity.
wifi_scanBatteryStats “Ws” key.✔️
wifi_scan_ratioPercent (0-1%) of time spent with the Wi-Fi scanning.Segment battery drain investigations by Wi-Fi activity.
wifi_multicastBatteryStats “Wm” key.✔️
wifi_radioBatteryStats “Wr” key.✔️
wifi_radio_active_ratioPercent (0-1%) of time spent with Wi-Fi radio active.Segment battery drain investigations by Wi-Fi activity.
wifi_runningBatteryStats “Ww” key.✔️
wifi_signal_strengthBatteryStats “Wss” key.✔️
wifi_signal_strength_poor_or_very_poor_ratioPercent (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_supplicantBatteryStats “Wsp” key.✔️
power_saveBatteryStats “ps” or “lp” key.✔️
dozeBatteryStats “di” key.✔️
doze_full_ratioPercent (0-1%) of time spent with the Device Idle state at “Full”.Segment battery drain investigations by Doze.
doze_ratioPercent (0-1%) of time spent with the Device Idle state at “Full” or “Light”.Segment battery drain investigations by Doze.
userBatteryStats “Eur” key.✔️
user_foregroundBatteryStats “Euf” key.✔️
jobBatteryStats “Ejb” key.✔️
package_installBatteryStats “Epi” key.✔️
package_install_countNumber of packages installed this period.Identify periods of high package manager activity.
package_uninstallBatteryStats “Epu” key.✔️
device_activeBatteryStats “Eac” key.✔️
bluetooth_le_scanningBatteryStats “Etp” key.✔️
bluetooth_scan_ratioPercent (0-1%) of time spent with the Bluetooth scanning.Segment battery drain investigations by Bluetooth activity.
phone_radioBatteryStats “Pr” key.✔️
phone_radio_active_ratioPercent (0-1%) of time spent with the Phone radio active.Segment battery drain investigations by Phone Radio activity.
phone_connectionBatteryStats “Pcn” key.✔️
phone_connection_latestLatest 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_callBatteryStats “Pcl” key.✔️
phone_in_call_ratioPercent (0-1%) of time spent in a phone call.Segment battery drain investigations by Phone Call activity.
phone_scanningBatteryStats “Psc” key.✔️
phone_scanning_ratioPercent (0-1%) of time spent with the Phone radio scanningSegment battery drain investigations by Phone activity.
phone_signal_strengthBatteryStats “Pss” key.✔️
phone_signal_strength_none_ratioPercent (0-1%) of time spent with the Phone radio signal strength at “None”.Identify periods of poor network reliability.
phone_signal_strength_poor_ratioPercent (0-1%) of time spent with the Phone radio signal strength at “Poor”.Identify periods of poor network reliability.
phone_stateBatteryStats “Pst” key.✔️
phone_state_in_ratioPercent (0-1%) of time spent with the phone registered with an operator.
phone_state_out_ratioPercent (0-1%) of time spent with the phone not registered to any operator.Identify periods of poor network connectivity.
phone_state_em_ratioPercent (0-1%) of time spent with the phone registered and locked for emergency use only.
top_appBatteryStats “Etp” key.✔️
foregroundBatteryStats “Efg” key.✔️
longwakeBatteryStats “Elw” key.✔️
long_wake_lock_on_ratioPercent (0-1%) of time spent with a Long running wake lock acquired.Segment battery drain investigations by wake locks.
alarmBatteryStats “Eal” key.✔️
startBatteryStats “START” or “SHUTDOWN”.✔️
screen_dozeBatteryStats “Sd” key.✔️
flashlightBatteryStats “fl” key.✔️
flashlight_on_ratioPercent (0-1%) of time spent with the flashlight on.Segment battery drain investigations by flashlight use.
bluetoothBatteryStats “b” key.✔️
bluetooth_on_ratioPercent (0-1%) of time spent with Bluetooth on.Segment battery drain investigations by Bluetooth drain.
usb_dataBatteryStats “Ud” key.✔️
usb_data_on_ratioPercent (0-1%) of time spent with an USB data connection active.
cellular_high_tx_powerBatteryStats “Chtp” key.✔️
cellular_high_tx_power_on_ratioPercent (0-1%) of time spent using high cellular TX power.Segment battery drain investigations by high cellular impact.
nr_stateBatteryStats “nrs” key.✔️
nr_state_none_ratioPercent (0-1%) of time spent with no LTE cell.Segment battery drain investigations by cellular connectivity. Identify poor network connectivity.
nr_state_restricted_ratioPercent (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_ratioPercent (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_ratioPercent (0-1%) of time spent actively connected to an LTE cell.Segment battery drain investigations by cellular connectivity. Identify poor network connectivity.
screen_wakeBatteryStats “Esw” key.✔️
screen_wake_countNumber of screen wake events.

Battery Metrics​

MetricDescriptionUsage
battery_discharge_duration_msTime spent with the battery discharging. Calculated by the time spent in the BatteryStats Battery Status (“Bs”) Discharging (“d”) state.
battery_charge_duration_msTime spent charging the battery. Calculated by the time spent in the BatteryStats Battery Status (“Bs”) Charging (“c”) state.
battery_soc_pct_dropBattery 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_riseBattery charge gained (in whole %). Calculated as the rise in the BatteryStats Battery Level (“Bl”) value.
battery_charge_rate_pct_per_hour_avgCharging 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_avgDischarge 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_%/hourBattery 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_%/hourBattery 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_msTime 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_dropBattery 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_msTime 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_dropBattery 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_nameName of the component with the highest battery usage that period.
battery_use_top_component_pctPercent usage of the component with the highest battery usage that period.
estimated_battery_capacity_mahReturns 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_mahReturns 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_mahReturns the total amount of battery charge drained since the last BatteryStats reset.
min_battery_capacity_mahReturns the minimum range of discharged power since the last BatteryStats reset.
max_battery_capacity_mahReturns 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.latestValue 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:

Battery usage per component
  • This is shown in the Battery Usage %/hour swimlane 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.

MetricDescriptionUsageHRT only
airplane_modeChecks 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.latestChecks whether Airplane Mode was enabled. Derived from Settings.Global.AIRPLANE_MODE_ON.
connectivity.internet.latestChecks whether Internet connectivity was detected on the connected network.
connectivity.validated.latestChecks whether the connectivity on the connected network was successfully validated. Derived from NetworkCapabilities.NET_CAPABILITY_VALIDATED.
connectivity.captive_portal.latestChecks 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.latestChecks whether the connected network is roaming. Derived from NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING.
connectivity.unmetered_temporarily.latestChecks whether the connected network is temporarily unmetered. Derived from NetworkCapabilities.NET_CAPABILITY_TEMPORARILY_NOT_METERED.
connectivity.metered.latestChecks whether the connected network is metered. Derived from NetworkCapabilities.NET_CAPABILITY_NOT_METERED.
connectivity.ip_version.latestRecords support for IPv4 or IPv6 from the connected Wi-Fi network.
connectivity.ipv4_status.latestRecords the IPv4 connectivity of the connected Wi-Fi network.
connectivity.ipv6_status.latestRecords the IPv6 connectivity of the connected Wi-Fi network.
connectivity.wifi.rssi_moving_avgRecords the RSSI of the connected Wi-Fi network as a exponential moving average of the dBm.
connectivity.wifi.roaming_countCount of Wi-Fi roaming events (same SSID, different AP BSSID).
connectivity.wifi.channel_hop_countCount of Wi-Fi channel hop events (same SSID, different frequencies).
connectivity.wifi.frequency_bandRecords 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_ouiRecords 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_sessionSynthesizes a Wi-Fi session and various parameters based off of the StatsD “WifiDisconnectReported” key.
sync_memfault_successfulNumber of requests to Memfault that completed successfully. Always reported, even if 0.Track the reliability of data uploads to Memfault.
sync_memfault_failureNumber of requests to Memfault that failed, including failures due to network issues. Always reported, even if 0.Identify devices that are struggling to upload data to Memfault, for example due to poor connectivity.
connectivity_expected_time_msTotal time tracked across all connectivity types (connected and not connected) during the heartbeat period.Denominator for the Connectivity Device Vital (percentage of time connected).
connectivity_connected_time_msTime spent connected via Wi-Fi, cellular, Ethernet, or Bluetooth during the heartbeat period.Numerator for the Connectivity Device Vital (percentage of time connected).
connectivity.wifi.rssiLatest Wi-Fi RSSI (dBm) reported by WifiManager broadcasts.Track Wi-Fi signal strength.
connectivity.wifi.disconnectsNumber of Wi-Fi disconnects, from the StatsD “WifiDisconnectReported” atom. Android 12+.Identify devices with unstable Wi-Fi connections.
connectivity.wifi.disconnectedEvent containing the details of the latest Wi-Fi disconnect, from the StatsD “WifiDisconnectReported” atom. Android 12+.Investigate the cause of Wi-Fi disconnects on a specific device.

Uptime Metrics​

The connectivity type matches the transport types returned from the Android NetworkCapabilities#hasTransport API.

MetricDescriptionUsageHRT only
connectivity.type_(.*).secs/hourRate 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_secsAbsolute time (seconds) connected to the type of connectivity (one of NONE|ETHERNET|CELLULAR|WIFI|VPN|USB|UNKNOWN).
connectivity.type_(.*).mean_time_in_state_msAverage time (seconds) spent connected to the type of connectivity (one of NONE|ETHERNET|CELLULAR|WIFI|VPN|USB|UNKNOWN).

Wi-Fi Metrics​

If the Device is connected to a Wi-Fi network, additional Wi-Fi metrics can be collected.

MetricDescriptionUsageHRT only
connectivity.wifi.frequencyReturns the frequency of the connected Wi-Fi network, if available.
connectivity.wifi.link_speed_mbpsReturns the link speed (in Mbps) of the connected Wi-Fi network, if available.
connectivity.wifi.standard_versionReturns the standard of the connected Wi-Fi network, if available (Android 11+).
connectivity.wifi.security_typeReturns the security type of the connected Wi-Fi network, if available (Android 12+).
connectivity.wifi.lost_tx_packets_per_secondAverage rate of lost transmitted packets (packets per second).Identify devices with poor network reliability.
connectivity.wifi.retried_tx_packets_per_secondAverage rate of transmitted retry packets (packets per second).Identify devices with poor network reliability.
connectivity.wifi.successful_tx_packets_per_secondAverage rate of successfully transmitted unicast packets (packets per second).
connectivity.wifi.successful_rx_packets_per_secondAverage rate of received unicast data packets (packets per second).
connectivity.ip_version.latestRecords support for IPv4 or IPv6 from the connected Wi-Fi network.
connectivity.ipv4_status.latestRecords the IPv4 connectivity of the connected Wi-Fi network.
connectivity.ipv6_status.latestRecords the IPv6 connectivity of the connected Wi-Fi network.
connectivity.wifi.rssi_moving_avgRecords the RSSI of the connected Wi-Fi network as a exponential moving average of the dBm.
connectivity.wifi.roaming_countCount of Wi-Fi roaming events (same SSID, different AP BSSID).
connectivity.wifi.channel_hop_countCount of Wi-Fi channel hop events (same SSID, different frequencies).
connectivity.wifi.frequency_bandRecords 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_ouiRecords 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_sessionSynthesizes a Wi-Fi session and various parameters based off of the StatsD “WifiDisconnectReported” key.
connectivity.wifi.rssiLatest Wi-Fi RSSI (dBm) reported by WifiManager broadcasts.Track Wi-Fi signal strength.
connectivity.wifi.disconnectsNumber of Wi-Fi disconnects, from the StatsD “WifiDisconnectReported” atom. Android 12+.Identify devices with unstable Wi-Fi connections.
connectivity.wifi.disconnectedEvent containing the details of the latest Wi-Fi disconnect, from the StatsD “WifiDisconnectReported” atom. Android 12+.Investigate the cause of Wi-Fi disconnects on a specific device.

Network Bandwidth​

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.

MetricDescriptionUsage
connectivity_recv_bytesTotal data received from the network (bytes).Track the network usage of the device.
connectivity_sent_bytesTotal data sent through the network (bytes).Track the network usage of the device.
connectivity_(bt|wifi|mobile|eth)_(recv|sent)_bytesTotal 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)_bytesTotal 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)_bytesTotal data received/sent through the network for the type of connectivity by the specific component (bytes).

Bluetooth Metrics​

MetricDescriptionUsage
bluetooth.ble_scan_result.count.(count|mean|max)Records number of devices found in the BLE scan. StatsD “BleScanResultReceived” key.
bluetooth.ble_scan_result.attribution.latestRecords 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.latestRecords 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.latestRecords 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.latestRecords the Bluetooth Link Quality Report event from the controller. StatsD “BluetoothQualityReportReported” key.
bluetooth.disconnect.latestEvent containing the details of the latest Bluetooth disconnect, from the StatsD “BluetoothConnectionStateChanged” atom.Investigate Bluetooth disconnects on a specific device.
bluetooth.disconnect_reason.latestReason code of the latest Bluetooth disconnect.Identify the most common Bluetooth disconnect reasons.
bluetooth.disconnects.sumNumber of Bluetooth disconnects.Identify devices with unstable Bluetooth connections to peripherals.

Storage Metrics​

The Android SDK regularly collects Device storage usage metrics from Android's Environment.getDataDirectory API.

MetricDescriptionUsage
storage_used_pctPercent (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.latestDeprecated. Percent (0-1%) of free space in the user data directory.
storage.data.bytes_free.latestAmount of free space in the user directory (bytes).
storage.data.bytes_used.latestAmount of used space in the user directory (bytes).
storage.data.bytes_total.latestTotal storage available in the user directory (bytes).
storage_(.*)_bytesTotal storage used (app + cache + data + external cache) by an app, for packages configured as significant apps.Track storage growth of specific apps.
storage.app.(app|cache|data|extcache)_(.*)Storage used by an app, broken down by type, for packages configured as significant apps. extcache is only reported on Android 12+.Identify which kind of storage (code, cache, or data) is growing for a specific app.

Temperature Metrics​

The Android SDK regularly collects several device temperature metrics, from Android's HardwarePropertiesManager. This allows the SDK to collect the CPU, GPU, NPU, battery and device skin temperatures programmatically.

Since SDK 5.10.0, a single maximum is reported per sensor type (for example thermal_cpu_c_max, the maximum across all CPU sensors), instead of one metric per sensor.

Since SDK 5.8.0, the SDK can also collect temperatures from the thermal zones in /sys/class/thermal (sysfs_thermal_* metrics). This is disabled by default, and is enabled with the metrics.sysfs_thermal_enabled SDK setting.

MetricDescriptionUsage
thermal_cpu_c_maxMax temperature (Celsius) of all CPU sensors.Identify devices with high CPU temperature readings.
thermal_battery_cAverage temperature (Celsius) of all Battery sensors.Track the average Battery temperature of the device.
thermal_battery_c_maxMax temperature (Celsius) of all Battery sensors.Identify devices with high Battery temperature readings.
thermal_status_(.*)_maxMax 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.
thermal_(gpu|npu|skin)_c_maxMaximum temperature across all sensors of the given type (GPU, NPU, or device skin), in °C.Track overheating of the GPU, NPU, or device surface.
sysfs_thermal_(.*)_c.(min|mean|max)Temperature of each thermal zone exposed in /sys/class/thermal (°C), collected via Dumpster. Disabled by default, enabled with the metrics.sysfs_thermal_enabled SDK setting.Track temperatures for thermal zones not exposed via HardwarePropertiesManager.

Memory Metrics​

MetricDescriptionUsage
memory_pctAverage memory used by the system (0-100%), polled every 5 minutes by default.Track the average memory usage of the device.
memory_pct_maxMax memory used by the system (0-100%), polled every 5 minutes by default.Identify periods of high memory usage.
memory.low_mem_reported.sumCount of low memory events reported by the system server. StatsD “LowMemReported” key.Track high memory pressure on the device.
memory.lmk_kill_occurred.(count|latest)Report of process kill events by the low memory killer daemon. StatsD "LmkKillOccurred” key.Track high memory pressure on the device.

CPU Metrics​

MetricDescriptionUsage
cpu_usage_pctAverage 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_(.*)_pctAverage 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​

MetricDescriptionUsage
disk_wear.(.*).version.latestFlash EMMC/UFS version, as reported by the vendor implementation.
disk_wear.(.*).pre_eol.latestPre-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.latestEstimate 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.latestEstimate 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_writtenCount of bytes written to the (virtual) device.Identify periods of high disk wear on the device.

Disk Usage Metrics​

MetricDescriptionUsage
disk.slow_io_(read|write|unmap|sync|unknown)_24h_count.latestLog of slow I/O events on the primary storage. StatsD "SlowIo” key.
storage_(.*)_write_bytesBytes written by an app that actually reached physical storage, for packages configured as significant apps.Identify apps causing excessive flash wear.
storage_(.*)_logical_write_bytesBytes written by an app (including writes absorbed by caches), for packages configured as significant apps.Compare with storage_(.*)_write_bytes to see how much of an app's writes reach physical storage.

USB Metrics​

MetricDescriptionUsage
usb.contaminant_reported.latestChecks for the presence of a USB contaminants. StatsD "UsbContaminantReported” key.
usb.devices.latestTracks any connected USB devices via ACTION_USB_DEVICE_ATTACHED/DETACHED.
usb.accessories.latestTracks any connected USB accessories via ACTION_USB_ACCESSORY_ATTACHED/DETACHED.
usb.connected.latestWhether USB is connected. Collected via StatsD.
usb.connections.sumNumber of USB connections.Identify devices with flaky USB connectors or cables.
usb.connect_duration_ms.(mean|max|sum)How long each USB connection lasted, in milliseconds.Short connection durations combined with a high connection count may indicate a faulty connector.
usb.compliance_warnings.sumNumber of USB compliance warnings raised. Android 14+.Identify devices connected to non-compliant USB chargers or cables.
usb.compliance_warning.latestEvent naming the USB compliance warnings raised. Android 14+.Investigate which compliance warnings a specific device is seeing.

Telephony Metrics​

MetricDescriptionUsage
phone.imeiThis device’s IMEI number, if it exists. Collected via TelephonyManager.

Cellular Metrics​

The Android SDK collects cellular network and signal metrics from Android's TelephonyManager. Collection is enabled by default, and can be disabled with the metrics.collect_cellular SDK setting.

MetricDescriptionUsage
cellular_mcc.latestMobile Country Code of the registered network, from TelephonyManager.Group devices by the country of the network they are using.
cellular_mnc.latestMobile Network Code of the registered network, from TelephonyManager.Group devices by carrier, for example to compare signal quality between carriers.
cellular_rat.latestRadio access technology of the current network (for example LTE or NR), from TelephonyManager.Track which network generations devices are connecting with.
cellular_sim_state.latestSIM card state, from TelephonyManager.Identify devices with a missing, locked, or faulty SIM.
cellular_signal_level.latestCellular signal level (0-4), as shown by the status bar signal bars. Android 9+.Track cellular signal quality across the fleet.
cellular_signal_dbm.latestCellular signal strength in dBm. Android 9+.Track cellular signal strength across the fleet.
cellular_(lte|nr)_rsrp_dbm.latestReference Signal Received Power in dBm. Only reported when connected to LTE (Android 9+) or NR (5G, Android 10+).Track LTE/5G signal strength.
cellular_(lte|nr)_rsrq_db.latestReference Signal Received Quality in dB. Only reported when connected to LTE (Android 9+) or NR (5G, Android 10+).Track LTE/5G signal quality, including interference.

GNSS Metrics​

On devices with GPS hardware, the Android SDK collects GNSS diagnostic metrics from dumpsys location. Collection is controlled by the metrics.location_enabled SDK setting. Some metrics are only reported on devices that support them (for example, L5 metrics require dual-frequency GNSS hardware).

MetricDescriptionUsage
gnss_location_failure_pct.(min|mean|max)Fraction of location fix attempts that failed (0.0-1.0), from dumpsys location.Identify devices with poor sky view, antenna issues, or interference.
gnss_ttff_mean_sec.(min|mean|max)Mean Time-to-First-Fix, in seconds.Track how quickly devices acquire a fix. Values over 30s suggest cold starts or poor signal.
gnss_ttff_stddev_sec.meanStandard deviation of Time-to-First-Fix, in seconds.A high value indicates inconsistent fix acquisition.
gnss_position_accuracy_mean_m.(min|mean|max)Mean horizontal position accuracy, in meters.Track location accuracy across the fleet.
gnss_position_accuracy_stddev_m.meanStandard deviation of horizontal position accuracy, in meters.A high value indicates inconsistent location accuracy.
gnss_cn0_top4_mean_dbhz.(min|mean|max)Mean carrier-to-noise density (C/N0) of the top 4 satellites, in dB-Hz.Direct measure of GNSS signal strength. Below 20 is poor (unreliable fix, high battery drain), 35 or above is good.
gnss_cn0_top4_stddev_dbhz.meanStandard deviation of the top 4 satellites' C/N0, in dB-Hz.A high value indicates an intermittent or obstructed signal.
gnss_l5_cn0_top4_mean_dbhz.(min|mean|max)Mean C/N0 of the top 4 L5-band satellites, in dB-Hz. Only reported on dual-frequency hardware.Track L5 signal strength. L5 is more resistant to multipath than L1.
gnss_l5_cn0_top4_stddev_dbhz.meanStandard deviation of the top 4 L5-band satellites' C/N0, in dB-Hz.A high value indicates an intermittent or obstructed L5 signal.
gnss_sv_used_in_fix_ratio.(min|mean|max)Ratio of satellite status messages where the satellite was used in a position fix, versus all satellite status messages processed.Track how many visible satellites are usable for a fix.
gnss_sv_l5_used_in_fix_ratio.(min|mean|max)Ratio of L5-band satellite status messages where the satellite was used in a position fix, versus all L5 satellite status messages processed.Track dual-frequency performance. A higher ratio indicates better multi-frequency performance.
gnss_cn0_above_20_dbhz_time_min.latestMinutes spent on battery with the top 4 satellites' C/N0 above 20 dB-Hz, since the previous heartbeat.Time spent with good GNSS signal while on battery.
gnss_cn0_below_20_dbhz_time_min.latestMinutes spent on battery with the top 4 satellites' C/N0 at or below 20 dB-Hz, since the previous heartbeat.Time spent with weak GNSS signal while on battery, when GNSS drains significantly more battery.
gnss_energy_consumed_mah.latestEnergy consumed by the GNSS hardware while on battery since the previous heartbeat, in mAh. May be 0 if the HAL does not report it.Track the battery cost of GNSS usage.

System Metrics​

MetricDescriptionUsage
uptime_sDevice uptime in seconds at the time of heartbeat collection, including time spent in deep sleep.Identify devices that reboot frequently, or that have been running for a long time without a reboot.
boot_idThe Linux boot ID of the current boot.Correlate heartbeats and events that occurred during the same boot.

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:

Installed app versions configuration

Wildcards can be used, to collect multiple apps sharing the same package root.

Each collected version is stored as a Metric, prefixed with version.:

Installed app versions metric

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:

System Properties configuration

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

System Properties metric

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.

info

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).