[][src]Struct opentelemetry::metrics::Meter

pub struct Meter { /* fields omitted */ }
This is supported on crate feature metrics only.

Meter is the OpenTelemetry metric API, based on a sdk-defined MeterCore implementation and the Meter library name.

Implementations

impl Meter[src]

pub fn new<T: Into<&'static str>>(
    instrumentation_name: T,
    instrumentation_version: Option<T>,
    core: Arc<dyn MeterCore + Send + Sync>
) -> Self
[src]

Create a new named meter from a sdk implemented core

pub fn f64_value_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> ValueObserverBuilder<'_, f64> where
    T: Into<String>,
    F: Fn(ObserverResult<f64>) + Send + Sync + 'static, 
[src]

Creates a new floating point ValueObserverBuilder instrument with the given name and callback

pub fn u64_value_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> ValueObserverBuilder<'_, u64> where
    T: Into<String>,
    F: Fn(ObserverResult<u64>) + Send + Sync + 'static, 
[src]

Creates a new integral ValueObserverBuilder instrument with the given name and callback

pub fn i64_value_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> ValueObserverBuilder<'_, i64> where
    T: Into<String>,
    F: Fn(ObserverResult<i64>) + Send + Sync + 'static, 
[src]

Creates a new integral ValueObserverBuilder instrument with the given name and callback

pub fn f64_sum_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> SumObserverBuilder<'_, f64> where
    T: Into<String>,
    F: Fn(ObserverResult<f64>) + Send + Sync + 'static, 
[src]

Creates a new floating point SumObserverBuilder instrument with the given name and callback

pub fn u64_sum_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> SumObserverBuilder<'_, u64> where
    T: Into<String>,
    F: Fn(ObserverResult<u64>) + Send + Sync + 'static, 
[src]

Creates a new integral SumObserverBuilder instrument with the given name and callback

pub fn f64_up_down_sum_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> UpDownSumObserverBuilder<'_, f64> where
    T: Into<String>,
    F: Fn(ObserverResult<f64>) + Send + Sync + 'static, 
[src]

Creates a new floating point UpDownSumObserverBuilder instrument with the given name and callback

pub fn i64_up_down_sum_observer<T, F>(
    &self,
    name: T,
    callback: F
) -> UpDownSumObserverBuilder<'_, i64> where
    T: Into<String>,
    F: Fn(ObserverResult<i64>) + Send + Sync + 'static, 
[src]

Creates a new integral SumUpDownObserverBuilder instrument with the given name and callback

pub fn f64_value_recorder<T>(&self, name: T) -> ValueRecorderBuilder<'_, f64> where
    T: Into<String>, 
[src]

Creates a new ValueRecorderBuilder for f64 values with the given name.

pub fn i64_value_recorder<T>(&self, name: T) -> ValueRecorderBuilder<'_, i64> where
    T: Into<String>, 
[src]

Creates a new ValueRecorderBuilder for i64 values with the given name.

pub fn u64_value_recorder<T>(&self, name: T) -> ValueRecorderBuilder<'_, u64> where
    T: Into<String>, 
[src]

Creates a new ValueRecorderBuilder for u64 values with the given name.

pub fn u64_counter<T>(&self, name: T) -> CounterBuilder<'_, u64> where
    T: Into<String>, 
[src]

Creates a new integer CounterBuilder for u64 values with the given name.

pub fn f64_counter<T>(&self, name: T) -> CounterBuilder<'_, f64> where
    T: Into<String>, 
[src]

Creates a new floating point CounterBuilder for f64 values with the given name.

pub fn i64_up_down_counter<T>(&self, name: T) -> UpDownCounterBuilder<'_, i64> where
    T: Into<String>, 
[src]

Creates a new integer UpDownCounterBuilder for an i64 up down counter with the given name.

pub fn f64_up_down_counter<T>(&self, name: T) -> UpDownCounterBuilder<'_, f64> where
    T: Into<String>, 
[src]

Creates a new floating point UpDownCounterBuilder for an f64 up down counter with the given name.

pub fn batch_observer(
    &self,
    callback: BatchObserverCallback
) -> BatchObserver<'_>
[src]

Creates a new BatchObserver that supports making batches of observations for multiple instruments.

pub fn record_batch<T: IntoIterator<Item = Measurement>>(
    &self,
    labels: &[KeyValue],
    measurements: T
)
[src]

Atomically record a batch of measurements.

pub fn record_batch_with_context<T: IntoIterator<Item = Measurement>>(
    &self,
    cx: &Context,
    labels: &[KeyValue],
    measurements: T
)
[src]

Atomically record a batch of measurements with a given context

Trait Implementations

impl Debug for Meter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,