pub struct InstrumentConfig { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Config contains some options for metrics of any kind.
Implementations§
Source§impl InstrumentConfig
impl InstrumentConfig
Sourcepub fn with_instrumentation_name(instrumentation_name: &'static str) -> Self
pub fn with_instrumentation_name(instrumentation_name: &'static str) -> Self
Create a new config from instrumentation name
Sourcepub fn with_instrumentation<T: Into<Cow<'static, str>>>(
instrumentation_name: T,
instrumentation_version: Option<T>,
) -> Self
pub fn with_instrumentation<T: Into<Cow<'static, str>>>( instrumentation_name: T, instrumentation_version: Option<T>, ) -> Self
Create a new config with instrumentation name and optional version
Sourcepub fn description(&self) -> Option<&String>
pub fn description(&self) -> Option<&String>
Description is an optional field describing the metric instrument.
Sourcepub fn unit(&self) -> Option<&Unit>
pub fn unit(&self) -> Option<&Unit>
Unit is an optional field describing the metric instrument data.
Sourcepub fn instrumentation_name(&self) -> Cow<'static, str>
pub fn instrumentation_name(&self) -> Cow<'static, str>
Instrumentation name is the name given to the Meter that created this instrument.
Sourcepub fn instrumentation_version(&self) -> Option<Cow<'static, str>>
pub fn instrumentation_version(&self) -> Option<Cow<'static, str>>
Instrumentation version returns the version of instrumentation
Trait Implementations§
Source§impl Clone for InstrumentConfig
impl Clone for InstrumentConfig
Source§fn clone(&self) -> InstrumentConfig
fn clone(&self) -> InstrumentConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InstrumentConfig
impl Debug for InstrumentConfig
Source§impl Hash for InstrumentConfig
impl Hash for InstrumentConfig
Source§impl PartialEq for InstrumentConfig
impl PartialEq for InstrumentConfig
impl StructuralPartialEq for InstrumentConfig
Auto Trait Implementations§
impl Freeze for InstrumentConfig
impl RefUnwindSafe for InstrumentConfig
impl Send for InstrumentConfig
impl Sync for InstrumentConfig
impl Unpin for InstrumentConfig
impl UnwindSafe for InstrumentConfig
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> 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.