pub enum MetricEventLoggerRequest {
LogOccurrence {
metric_id: u32,
count: u64,
event_codes: Vec<u32>,
responder: MetricEventLoggerLogOccurrenceResponder,
},
LogInteger {
metric_id: u32,
value: i64,
event_codes: Vec<u32>,
responder: MetricEventLoggerLogIntegerResponder,
},
LogIntegerHistogram {
metric_id: u32,
histogram: Vec<HistogramBucket>,
event_codes: Vec<u32>,
responder: MetricEventLoggerLogIntegerHistogramResponder,
},
LogString {
metric_id: u32,
string_value: String,
event_codes: Vec<u32>,
responder: MetricEventLoggerLogStringResponder,
},
LogMetricEvents {
events: Vec<MetricEvent>,
responder: MetricEventLoggerLogMetricEventsResponder,
},
}
Expand description
A logger for events that are associated with one project’s metrics.
Variants§
LogOccurrence
Fields
responder: MetricEventLoggerLogOccurrenceResponder
Logs the fact that an event has occurred a number of times.
metric_id
ID of the metric being logged.
count
The number of times the event has occurred. The value should
be positive as a value of 0 is ignored.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Occurrence counts with the same event codes are aggregated
based on these parameters.
LogInteger
Fields
responder: MetricEventLoggerLogIntegerResponder
Logs an integer measurement.
metric_id
ID of the metric being logged.
value
The integer measurement.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Integer values with the same event codes are aggregated
based on these parameters.
LogIntegerHistogram
Fields
histogram: Vec<HistogramBucket>
Logs a histogram giving many approximate integer measurements.
metric_id
ID of the metric being logged.
histogram
The collection of approximate integer measurements. Buckets
that have no measurement (empty buckets) should not be sent.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Histograms with the same event codes are aggregated together
based on these parameters.
LogString
Fields
responder: MetricEventLoggerLogStringResponder
Logs a string value that was observed.
metric_id
ID of the metric being logged.
string_value
The string to log.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Counts of logged strings are aggregated separately based on
these parameters.
LogMetricEvents
Bulk logging method, equivalent to making many of the above Log*() calls at once.
Implementations§
source§impl MetricEventLoggerRequest
impl MetricEventLoggerRequest
pub fn into_log_occurrence( self ) -> Option<(u32, u64, Vec<u32>, MetricEventLoggerLogOccurrenceResponder)>
pub fn into_log_integer( self ) -> Option<(u32, i64, Vec<u32>, MetricEventLoggerLogIntegerResponder)>
pub fn into_log_integer_histogram( self ) -> Option<(u32, Vec<HistogramBucket>, Vec<u32>, MetricEventLoggerLogIntegerHistogramResponder)>
pub fn into_log_string( self ) -> Option<(u32, String, Vec<u32>, MetricEventLoggerLogStringResponder)>
pub fn into_log_metric_events( self ) -> Option<(Vec<MetricEvent>, MetricEventLoggerLogMetricEventsResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL