pub struct TemporalMeter { /* private fields */ }Expand description
Wraps a CoreMeter to enable the attaching of default labels to metrics. Cloning is cheap.
Implementations§
Source§impl TemporalMeter
impl TemporalMeter
Sourcepub fn new(
meter: Arc<dyn CoreMeter>,
default_attribs: NewAttributes,
task_queue_label_strategy: TaskQueueLabelStrategy,
) -> Self
pub fn new( meter: Arc<dyn CoreMeter>, default_attribs: NewAttributes, task_queue_label_strategy: TaskQueueLabelStrategy, ) -> Self
Create a new TemporalMeter.
Sourcepub fn get_default_attributes(&self) -> &MetricAttributes
pub fn get_default_attributes(&self) -> &MetricAttributes
Returns the default attributes this meter uses.
Sourcepub fn get_task_queue_label_strategy(&self) -> &TaskQueueLabelStrategy
pub fn get_task_queue_label_strategy(&self) -> &TaskQueueLabelStrategy
Returns the Task Queue labeling strategy this meter uses.
Sourcepub fn merge_attributes(&mut self, new_attribs: NewAttributes)
pub fn merge_attributes(&mut self, new_attribs: NewAttributes)
Add some new attributes to the default set already in this meter.
Trait Implementations§
Source§impl Clone for TemporalMeter
impl Clone for TemporalMeter
Source§fn clone(&self) -> TemporalMeter
fn clone(&self) -> TemporalMeter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemporalMeter
impl Debug for TemporalMeter
Auto Trait Implementations§
impl Freeze for TemporalMeter
impl !RefUnwindSafe for TemporalMeter
impl Send for TemporalMeter
impl Sync for TemporalMeter
impl Unpin for TemporalMeter
impl UnsafeUnpin for TemporalMeter
impl !UnwindSafe for TemporalMeter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request