fuchsia.legacymetrics

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. For similar behavior, see Chromium's MetricsService: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/master/components/metrics/metrics_service.cc

Record

Processes and enqueues a batch of events for upload.

Request

NameType
events vector<Event>

Response

NameType

STRUCTS

HistogramBucket

Defined in fuchsia.legacymetrics/event.fidl

NameTypeDescriptionDefault
min int64 No default
max int64 No default
count int64 No default

TABLES

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

OrdinalNameTypeDescription
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

Histogram

Defined in fuchsia.legacymetrics/event.fidl

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

OrdinalNameTypeDescription
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 data. This field takes precedence over any equivalent name included in binary data, if both are provided.

UNIONS

Event

Defined in fuchsia.legacymetrics/event.fidl

A single metric event to be recorded and sent to the UMA backend.

NameTypeDescription
user_action_event UserActionEvent
histogram Histogram
impl_defined_event ImplementationDefinedEvent