Skip to main content

MetricEventLoggerLocalServerHandler

Trait MetricEventLoggerLocalServerHandler 

Source
pub trait MetricEventLoggerLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn log_occurrence(
        &mut self,
        request: Request<LogOccurrence, ___T>,
        responder: Responder<LogOccurrence, ___T>,
    ) -> impl Future<Output = ()>;
    fn log_integer(
        &mut self,
        request: Request<LogInteger, ___T>,
        responder: Responder<LogInteger, ___T>,
    ) -> impl Future<Output = ()>;
    fn log_integer_histogram(
        &mut self,
        request: Request<LogIntegerHistogram, ___T>,
        responder: Responder<LogIntegerHistogram, ___T>,
    ) -> impl Future<Output = ()>;
    fn log_string(
        &mut self,
        request: Request<LogString, ___T>,
        responder: Responder<LogString, ___T>,
    ) -> impl Future<Output = ()>;
    fn log_metric_events(
        &mut self,
        request: Request<LogMetricEvents, ___T>,
        responder: Responder<LogMetricEvents, ___T>,
    ) -> impl Future<Output = ()>;
}
Expand description

A server handler for the MetricEventLogger protocol.

See MetricEventLogger for more details.

Required Methods§

Source

fn log_occurrence( &mut self, request: Request<LogOccurrence, ___T>, responder: Responder<LogOccurrence, ___T>, ) -> impl Future<Output = ()>

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.

Source

fn log_integer( &mut self, request: Request<LogInteger, ___T>, responder: Responder<LogInteger, ___T>, ) -> impl Future<Output = ()>

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.

Source

fn log_integer_histogram( &mut self, request: Request<LogIntegerHistogram, ___T>, responder: Responder<LogIntegerHistogram, ___T>, ) -> impl Future<Output = ()>

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.

Source

fn log_string( &mut self, request: Request<LogString, ___T>, responder: Responder<LogString, ___T>, ) -> impl Future<Output = ()>

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.

Source

fn log_metric_events( &mut self, request: Request<LogMetricEvents, ___T>, responder: Responder<LogMetricEvents, ___T>, ) -> impl Future<Output = ()>

Bulk logging method, equivalent to making many of the above Log*() calls at once.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<___H, ___T> MetricEventLoggerLocalServerHandler<___T> for Local<___H>
where ___H: MetricEventLoggerServerHandler<___T>, ___T: Transport,

Source§

async fn log_occurrence( &mut self, request: Request<LogOccurrence, ___T>, responder: Responder<LogOccurrence, ___T>, )

Source§

async fn log_integer( &mut self, request: Request<LogInteger, ___T>, responder: Responder<LogInteger, ___T>, )

Source§

async fn log_integer_histogram( &mut self, request: Request<LogIntegerHistogram, ___T>, responder: Responder<LogIntegerHistogram, ___T>, )

Source§

async fn log_string( &mut self, request: Request<LogString, ___T>, responder: Responder<LogString, ___T>, )

Source§

async fn log_metric_events( &mut self, request: Request<LogMetricEvents, ___T>, responder: Responder<LogMetricEvents, ___T>, )

Implementors§