PROTOCOLS
MetricsRecorder
Defined in fuchsia.legacymetrics/metrics_recorder.fidl
Accepts metrics events and uploads them to UMA servers for analysis. Metrics events are batched and uploaded at a regular interval. If this service is unable to upload events, it will try persisting them for later re-upload. For similar behavior, see Chromium's MetricsService: https://chromium.googlesource.com/chromium/src.git/+/HEAD/components/metrics/metrics_service.cc
OnCloseSoon
Indicates that this service will close all connections soon. Upon receiving this event, each client should call Record() once for any available metrics and close its connection to this sevice. Otherwise, this service will close all incoming connections after a predefined timeout starting from the moment it broadcasts this event.
Response
<EMPTY>
Record
Processes and enqueues a batch of events for upload. Returns after the provided metrics are successfully processed by the service. Clients should wait for a completion callback before sending subsequent Record() requests.
Request
Name | Type |
---|---|
events |
vector<Event>
|
Response
<EMPTY>
STRUCTS
HistogramBucket
Defined in fuchsia.legacymetrics/event.fidl
Field | Type | Description | Default |
---|---|---|---|
min |
int64
|
No default | |
max |
int64
|
No default | |
count |
int64
|
No default |
TABLES
Histogram
Defined in fuchsia.legacymetrics/event.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
string
|
Required histogram identifier. See these guidelines for more info: https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#naming-your-histogram |
2 |
buckets |
vector<HistogramBucket>
|
|
3 |
sum |
int64
|
ImplementationDefinedEvent
Defined in fuchsia.legacymetrics/event.fidl
A custom event defined by the MetricsRecorder service. Refer to your MetricsRecorder implementation for more details on the payload structure.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
data |
vector<uint8>
|
Custom binary payload whose structure is defined by the MetricsRecorder implementation. For example, it can represent a custom event protocol buffer serialized to its wire format. |
2 |
name |
string
|
Event identifier required if it's not already included in binary |
UserActionEvent
Defined in fuchsia.legacymetrics/event.fidl
Event that occurs in response to a user action. See https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/actions/README.md
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
string
|
|
2 |
time |
zx/Time
|
Required timestamp of the event occurrence. See TimeTicks in https://cs.chromium.org/chromium/src/base/time/time.h |
UNIONS
Event strict
Defined in fuchsia.legacymetrics/event.fidl
A single metric event to be recorded and sent to the UMA backend.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
user_action_event |
UserActionEvent
|
|
2 |
histogram |
Histogram
|
|
3 |
impl_defined_event |
ImplementationDefinedEvent
|