pub struct Metadata<'a> { /* private fields */ }
Available on crate feature
metrics
only.Expand description
A container for the common elements for exported metric data that are shared
by the Accumulator
->Processor
and Processor
->Exporter
steps.
Implementations§
Source§impl<'a> Metadata<'a>
impl<'a> Metadata<'a>
Sourcepub fn new(
descriptor: &'a Descriptor,
attributes: &'a AttributeSet,
resource: &'a Resource,
) -> Self
pub fn new( descriptor: &'a Descriptor, attributes: &'a AttributeSet, resource: &'a Resource, ) -> Self
Create a new Metadata
instance.
Sourcepub fn descriptor(&self) -> &Descriptor
pub fn descriptor(&self) -> &Descriptor
A description of the metric instrument being exported.
Sourcepub fn attributes(&self) -> &AttributeSet
pub fn attributes(&self) -> &AttributeSet
The attributes associated with the instrument and the aggregated data.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Metadata<'a>
impl<'a> RefUnwindSafe for Metadata<'a>
impl<'a> Send for Metadata<'a>
impl<'a> Sync for Metadata<'a>
impl<'a> Unpin for Metadata<'a>
impl<'a> UnwindSafe for Metadata<'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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Available on crate feature
trace
only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Available on crate feature
trace
only.