The archivist consumes the following lifecycle events under appmgr through fuchsia.sys.internal.ComponentEventProvider
:
out/diagnostics
directory is being served by the component.{component manager}
The archivist consumes the following lifecycle events under component manager through fuchsia.sys2.EventSource
:
out/diagnostics
directory. When the component starts serving this directory, the component manager sends this event to the Archivist.Lifecycle events can be read through the ArchiveAccessor. Only the snapshot
mode is supported.
Results are returned as a vector<FormattedContent>
with each entry's variant matching the requested Format
, although JSON is the only supported format.
Each JSON object in the array is one event entry. Like other data types in ArchiveAccessor, each object consists of several fields, although the contents of metadata and payload differ from other sources. The following is an example of a JSON object entry:
{ "version": 1, "moniker": "core/network/netstack", "data_source": "LifecycleEvent", "metadata": { "timestamp": 1234567890, "lifecycle_event_type": "Started", "component_url": "fuchsia-pkg://fuchsia.com/network#meta/netstack.cm", “errors”: [] }, "payload": null, }
Monikers identify the component related to the triggered event.
As explained in Archivist consumption of lifecycle events, there are two systems that provide the archivist with events, appmgr and component manager:
.cmx
extension.cm
extensionThe time is recorded using the kernel's monotonic clock (nanoseconds) and conveyed without modification as an unsigned integer. The time is when the event was created by the component manager and appmgr, which also provide the time.
These are the valid values for lifecycle event types:
The URL with which the component related to this event was launched.
Optional vector of errors encountered by the platform when handling this event. Usually, no errors are expected for lifecycle events, so in most cases this is empty.
The payload is always be empty for lifecycle events. Other types of data sources, like logs and inspect, contain a payload. For more information, refer to the [ArchiveAccessor documentation][archive_accessor].