pub struct MetricEventLoggerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl MetricEventLoggerSynchronousProxy
impl MetricEventLoggerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<MetricEventLoggerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<MetricEventLoggerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn log_occurrence(
&self,
metric_id: u32,
count: u64,
event_codes: &[u32],
___deadline: MonotonicInstant,
) -> Result<MetricEventLoggerLogOccurrenceResult, Error>
pub fn log_occurrence( &self, metric_id: u32, count: u64, event_codes: &[u32], ___deadline: MonotonicInstant, ) -> Result<MetricEventLoggerLogOccurrenceResult, Error>
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.
Sourcepub fn log_integer(
&self,
metric_id: u32,
value: i64,
event_codes: &[u32],
___deadline: MonotonicInstant,
) -> Result<MetricEventLoggerLogIntegerResult, Error>
pub fn log_integer( &self, metric_id: u32, value: i64, event_codes: &[u32], ___deadline: MonotonicInstant, ) -> Result<MetricEventLoggerLogIntegerResult, Error>
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.
Sourcepub fn log_integer_histogram(
&self,
metric_id: u32,
histogram: &[HistogramBucket],
event_codes: &[u32],
___deadline: MonotonicInstant,
) -> Result<MetricEventLoggerLogIntegerHistogramResult, Error>
pub fn log_integer_histogram( &self, metric_id: u32, histogram: &[HistogramBucket], event_codes: &[u32], ___deadline: MonotonicInstant, ) -> Result<MetricEventLoggerLogIntegerHistogramResult, Error>
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.
Sourcepub fn log_string(
&self,
metric_id: u32,
string_value: &str,
event_codes: &[u32],
___deadline: MonotonicInstant,
) -> Result<MetricEventLoggerLogStringResult, Error>
pub fn log_string( &self, metric_id: u32, string_value: &str, event_codes: &[u32], ___deadline: MonotonicInstant, ) -> Result<MetricEventLoggerLogStringResult, Error>
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.
Sourcepub fn log_metric_events(
&self,
events: &[MetricEvent],
___deadline: MonotonicInstant,
) -> Result<MetricEventLoggerLogMetricEventsResult, Error>
pub fn log_metric_events( &self, events: &[MetricEvent], ___deadline: MonotonicInstant, ) -> Result<MetricEventLoggerLogMetricEventsResult, Error>
Bulk logging method, equivalent to making many of the above Log*() calls at once.
Trait Implementations§
Source§impl SynchronousProxy for MetricEventLoggerSynchronousProxy
impl SynchronousProxy for MetricEventLoggerSynchronousProxy
Source§type Proxy = MetricEventLoggerProxy
type Proxy = MetricEventLoggerProxy
Source§type Protocol = MetricEventLoggerMarker
type Protocol = MetricEventLoggerMarker
Proxy
controls.