pub struct Recorder { /* private fields */ }Expand description
A standard recorder that implements metrics::Recorder.
This instance implements , so
you can still interact with the SDK’s initialized Deref<Target = Meter>Meter instance.
Implementations§
Methods from Deref<Target = Meter>§
Sourcepub fn u64_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Counter<u64>>
pub fn u64_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Counter<u64>>
creates an instrument builder for recording increasing values.
Counter can be cloned to create multiple handles to the same instrument. If a Counter needs to be shared,
users are recommended to clone the Counter instead of creating duplicate Counters for the same metric. Creating
duplicate Counters for the same metric could lower SDK performance.
Sourcepub fn f64_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Counter<f64>>
pub fn f64_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Counter<f64>>
creates an instrument builder for recording increasing values.
Counter can be cloned to create multiple handles to the same instrument. If a Counter needs to be shared,
users are recommended to clone the Counter instead of creating duplicate Counters for the same metric. Creating
duplicate Counters for the same metric could lower SDK performance.
Sourcepub fn u64_observable_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableCounter<u64>, u64>
pub fn u64_observable_counter( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableCounter<u64>, u64>
creates an instrument builder for recording increasing values via callback.
Sourcepub fn f64_observable_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableCounter<f64>, f64>
pub fn f64_observable_counter( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableCounter<f64>, f64>
creates an instrument builder for recording increasing values via callback.
Sourcepub fn i64_up_down_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, UpDownCounter<i64>>
pub fn i64_up_down_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, UpDownCounter<i64>>
creates an instrument builder for recording changes of a value.
UpDownCounter can be cloned to create multiple handles to the same instrument. If a UpDownCounter needs to be shared,
users are recommended to clone the UpDownCounter instead of creating duplicate UpDownCounters for the same metric. Creating
duplicate UpDownCounters for the same metric could lower SDK performance.
Sourcepub fn f64_up_down_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, UpDownCounter<f64>>
pub fn f64_up_down_counter( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, UpDownCounter<f64>>
creates an instrument builder for recording changes of a value.
UpDownCounter can be cloned to create multiple handles to the same instrument. If a UpDownCounter needs to be shared,
users are recommended to clone the UpDownCounter instead of creating duplicate UpDownCounters for the same metric. Creating
duplicate UpDownCounters for the same metric could lower SDK performance.
Sourcepub fn i64_observable_up_down_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableUpDownCounter<i64>, i64>
pub fn i64_observable_up_down_counter( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableUpDownCounter<i64>, i64>
creates an instrument builder for recording changes of a value via callback.
UpDownCounter can be cloned to create multiple handles to the same instrument. If a UpDownCounter needs to be shared,
users are recommended to clone the UpDownCounter instead of creating duplicate UpDownCounters for the same metric. Creating
duplicate UpDownCounters for the same metric could lower SDK performance.
Sourcepub fn f64_observable_up_down_counter(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableUpDownCounter<f64>, f64>
pub fn f64_observable_up_down_counter( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableUpDownCounter<f64>, f64>
creates an instrument builder for recording changes of a value via callback.
Sourcepub fn u64_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Gauge<u64>>
pub fn u64_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Gauge<u64>>
creates an instrument builder for recording independent values.
Gauge can be cloned to create multiple handles to the same instrument. If a Gauge needs to be shared,
users are recommended to clone the Gauge instead of creating duplicate Gauges for the same metric. Creating
duplicate Gauges for the same metric could lower SDK performance.
Sourcepub fn f64_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Gauge<f64>>
pub fn f64_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Gauge<f64>>
creates an instrument builder for recording independent values.
Gauge can be cloned to create multiple handles to the same instrument. If a Gauge needs to be shared,
users are recommended to clone the Gauge instead of creating duplicate Gauges for the same metric. Creating
duplicate Gauges for the same metric could lower SDK performance.
Sourcepub fn i64_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> InstrumentBuilder<'_, Gauge<i64>>
pub fn i64_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> InstrumentBuilder<'_, Gauge<i64>>
creates an instrument builder for recording independent values.
Gauge can be cloned to create multiple handles to the same instrument. If a Gauge needs to be shared,
users are recommended to clone the Gauge instead of creating duplicate Gauges for the same metric. Creating
duplicate Gauges for the same metric could lower SDK performance.
Sourcepub fn u64_observable_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>
pub fn u64_observable_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableGauge<u64>, u64>
creates an instrument builder for recording the current value via callback.
Sourcepub fn i64_observable_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>
pub fn i64_observable_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableGauge<i64>, i64>
creates an instrument builder for recording the current value via callback.
Sourcepub fn f64_observable_gauge(
&self,
name: impl Into<Cow<'static, str>>,
) -> AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>
pub fn f64_observable_gauge( &self, name: impl Into<Cow<'static, str>>, ) -> AsyncInstrumentBuilder<'_, ObservableGauge<f64>, f64>
creates an instrument builder for recording the current value via callback.
Sourcepub fn f64_histogram(
&self,
name: impl Into<Cow<'static, str>>,
) -> HistogramBuilder<'_, Histogram<f64>>
pub fn f64_histogram( &self, name: impl Into<Cow<'static, str>>, ) -> HistogramBuilder<'_, Histogram<f64>>
creates an instrument builder for recording a distribution of values.
Histogram can be cloned to create multiple handles to the same instrument. If a Histogram needs to be shared,
users are recommended to clone the Histogram instead of creating duplicate Histograms for the same metric. Creating
duplicate Histograms for the same metric could lower SDK performance.
Sourcepub fn u64_histogram(
&self,
name: impl Into<Cow<'static, str>>,
) -> HistogramBuilder<'_, Histogram<u64>>
pub fn u64_histogram( &self, name: impl Into<Cow<'static, str>>, ) -> HistogramBuilder<'_, Histogram<u64>>
creates an instrument builder for recording a distribution of values.
Histogram can be cloned to create multiple handles to the same instrument. If a Histogram needs to be shared,
users are recommended to clone the Histogram instead of creating duplicate Histograms for the same metric. Creating
duplicate Histograms for the same metric could lower SDK performance.
Trait Implementations§
Source§impl Recorder for Recorder
impl Recorder for Recorder
Source§fn describe_counter(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString,
)
fn describe_counter( &self, key: KeyName, unit: Option<Unit>, description: SharedString, )
Source§fn describe_gauge(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString,
)
fn describe_gauge( &self, key: KeyName, unit: Option<Unit>, description: SharedString, )
Source§fn describe_histogram(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString,
)
fn describe_histogram( &self, key: KeyName, unit: Option<Unit>, description: SharedString, )
Auto Trait Implementations§
impl !RefUnwindSafe for Recorder
impl !UnwindSafe for Recorder
impl Freeze for Recorder
impl Send for Recorder
impl Sync for Recorder
impl Unpin for Recorder
impl UnsafeUnpin for Recorder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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> ⓘ
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> ⓘ
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 moreSource§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>
T in a tonic::Request