This module contains standardized entry points to the Fuchsia inspect subsystem. It works based
on the assumpton that a top-level static
Inspector is desirable.
inspector() function can be used to get a top level inspector, which ensures
consistent inspect behavior across components.
Use the [
health()][health] function to report the component health state through the
While using the component inspector is not mandatory, it is probably a good idea from the standpoint of uniform reporting.
use fuchsia_inspect::component; let inspector = component::inspector(); // Add a standardized health node to the default inspector as early as possible in code. // The component will report `STARTING_UP` as the status from here on. let mut health = component::health(); // Add a node with a metric to the inspector. inspector.root().create_string("property", "value"); // Report the component health as `OK` when ready. Calls to `health` are thread-safe. health.set_ok();
A thread-safe handle to a health reporter. See
component::health() for instructions on how
to create one.
Returns a handle to the standardized singleton top-level health reporter on each call.
Initializes and returns the singleton component inspector.
Returns the singleton component inspector.
Serves statistics about inspect such as size or number of dynamic children in the
fuchsia.inspect.Stats lazy node.