The Statsd module includes statsd, a native service that runs in the background
collecting metrics, and the Java service
StatsCompanionService, which runs in
the system process and bridges statsd and Java. This module is updatable,
meaning it can receive updates to functionality (such as updates to the metrics
used in data collection) outside of the normal Android release cycle.
Statsd is the primary touchpoint between the platform and launch-safety data collection. The statsd module includes the following code.
statsd, located in
StatsCompanionService, located in
A subset of the platform protobuf structures, located primarily in
As a native service, statsd can outlive the framework and detect crashes in the
The statsd module (
com.google.android.os.statsd) is in
APEX format and is available for devices
running Android 11 or higher.
The Statsd module presents a set of
@hide APIs to log events from the
system. For Java code, most
@hide APIs are refactored to be built on a
smaller set of
@SystemApi tagged methods, with some small generated
glue-code built in. For native code, existing native functions are refactored
to be official VNDK C APIs, with generated glue.
The Statsd module doesn't support customization.
The Android Compatibility Test Suite (CTS) verifies the functionality of statsd and the atoms on which release management depends.