pub struct V3MetricBuilder<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> V3MetricBuilder<'a>
impl<'a> V3MetricBuilder<'a>
Sets the tags for this metric.
Tags should be in “key:value” format.
Sourcepub fn set_resources(&mut self, resources: &[(&str, &str)])
pub fn set_resources(&mut self, resources: &[(&str, &str)])
Sets the resources for this metric.
Resources are (type, name) pairs, for example, (host, server1).
Sourcepub fn set_interval(&mut self, interval: u64)
pub fn set_interval(&mut self, interval: u64)
Sets the interval for this metric (used for rate metrics).
Sourcepub fn set_source_type(&mut self, source_type: &str)
pub fn set_source_type(&mut self, source_type: &str)
Sets the source type name for this metric.
Sourcepub fn set_origin(
&mut self,
product: u32,
category: u32,
service: u32,
no_index: bool,
)
pub fn set_origin( &mut self, product: u32, category: u32, service: u32, no_index: bool, )
Sets the origin metadata for this metric.
Sourcepub fn add_sketch(
&mut self,
timestamp: i64,
count: i64,
sum: f64,
min: f64,
max: f64,
bin_keys: &[i32],
bin_counts: &[u32],
)
pub fn add_sketch( &mut self, timestamp: i64, count: i64, sum: f64, min: f64, max: f64, bin_keys: &[i32], bin_counts: &[u32], )
Adds sketch data for a distribution metric.
For sketches, the summary values (count, sum, min, max) are stored as points, and the bin keys/counts are stored separately.
Auto Trait Implementations§
impl<'a> Freeze for V3MetricBuilder<'a>
impl<'a> RefUnwindSafe for V3MetricBuilder<'a>
impl<'a> Send for V3MetricBuilder<'a>
impl<'a> Sync for V3MetricBuilder<'a>
impl<'a> Unpin for V3MetricBuilder<'a>
impl<'a> !UnwindSafe for V3MetricBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more