class MetricEventLogger
Defined at line 2929 of file fidling/gen/sdk/fidl/fuchsia.metrics/fuchsia.metrics/hlcpp/fuchsia/metrics/cpp/fidl.h
A logger for events that are associated with one project's metrics.
Public Methods
void ~MetricEventLogger ()
void LogOccurrence (uint32_t metric_id, uint64_t count, ::std::vector<uint32_t> event_codes, LogOccurrenceCallback callback)
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.
void LogInteger (uint32_t metric_id, int64_t value, ::std::vector<uint32_t> event_codes, LogIntegerCallback callback)
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.
void LogIntegerHistogram (uint32_t metric_id, ::std::vector< ::fuchsia::metrics::HistogramBucket> histogram, ::std::vector<uint32_t> event_codes, LogIntegerHistogramCallback callback)
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.
void LogString (uint32_t metric_id, ::std::string string_value, ::std::vector<uint32_t> event_codes, LogStringCallback callback)
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.
void LogMetricEvents (::std::vector< ::fuchsia::metrics::MetricEvent> events, LogMetricEventsCallback callback)
Bulk logging method, equivalent to making many of the above Log*() calls
at once.