Struct aws_smithy_observability::meter::Meter
source · pub struct Meter { /* private fields */ }
Expand description
The entry point to creating instruments. A grouping of related metrics.
Implementations§
source§impl Meter
impl Meter
sourcepub fn new(
instrument_provider: Arc<dyn ProvideInstrument + Send + Sync>,
) -> Self
pub fn new( instrument_provider: Arc<dyn ProvideInstrument + Send + Sync>, ) -> Self
Create a new Meter from an ProvideInstrument
sourcepub fn create_gauge<F>(
&self,
name: impl Into<Cow<'static, str>>,
callback: F,
) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = f64>>, f64>
pub fn create_gauge<F>( &self, name: impl Into<Cow<'static, str>>, callback: F, ) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = f64>>, f64>
Create a new Gauge.
sourcepub fn create_up_down_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Arc<dyn UpDownCounter>>
pub fn create_up_down_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Arc<dyn UpDownCounter>>
Create a new UpDownCounter.
sourcepub fn create_async_up_down_counter<F>(
&self,
name: impl Into<Cow<'static, str>>,
callback: F,
) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = i64>>, i64>
pub fn create_async_up_down_counter<F>( &self, name: impl Into<Cow<'static, str>>, callback: F, ) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = i64>>, i64>
Create a new AsyncUpDownCounter.
sourcepub fn create_monotonic_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Arc<dyn MonotonicCounter>>
pub fn create_monotonic_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Arc<dyn MonotonicCounter>>
Create a new MonotonicCounter.
sourcepub fn create_async_monotonic_counter<F>(
&self,
name: impl Into<Cow<'static, str>>,
callback: F,
) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = u64>>, u64>
pub fn create_async_monotonic_counter<F>( &self, name: impl Into<Cow<'static, str>>, callback: F, ) -> AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = u64>>, u64>
Create a new AsyncMonotonicCounter.
sourcepub fn create_histogram(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Arc<dyn Histogram>>
pub fn create_histogram( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Arc<dyn Histogram>>
Create a new Histogram.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Meter
impl !RefUnwindSafe for Meter
impl Send for Meter
impl Sync for Meter
impl Unpin for Meter
impl !UnwindSafe for Meter
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.