Trait merino_suggest_traits::metrics::TimedMicros  
source · [−]pub trait TimedMicros {
    fn time_micros_with_tags<'a>(
        &'a self, 
        key: &'a str, 
        value: Duration
    ) -> MetricBuilder<'_, '_, Histogram>;
    fn time_micros(&self, key: &str, value: Duration) -> MetricResult<Histogram> { ... }
}Expand description
Trait for recording timer values with additional precision.
Time data is stored as a histogram. Statistical distribution is calculated by the server. Times will be stored a number of milliseconds, with fractional values used to represent nanoseconds.
Only `Duration types are valid.
See the Statsd spec for more information.
Note that tags and histograms are a Datadog extension to Statsd and may not be supported by your server.
Required Methods
Record a single histogram value with the given key and return a
MetricBuilder that can be used to add tags to the metric.
Provided Methods
fn time_micros(&self, key: &str, value: Duration) -> MetricResult<Histogram>
fn time_micros(&self, key: &str, value: Duration) -> MetricResult<Histogram>
Record a single histogram value with the given key
Errors
Returns an error if there was a problem sending the metric.