Struct opentelemetry_api::metrics::InstrumentBuilder
source · [−]pub struct InstrumentBuilder<'a, T> { /* private fields */ }
metrics
only.Expand description
Configuration for building an instrument.
Implementations
sourceimpl<'a, T> InstrumentBuilder<'a, T>where
T: TryFrom<Self, Error = MetricsError>,
impl<'a, T> InstrumentBuilder<'a, T>where
T: TryFrom<Self, Error = MetricsError>,
sourcepub fn with_description<S: Into<String>>(self, description: S) -> Self
pub fn with_description<S: Into<String>>(self, description: S) -> Self
Set the description for this counter
Trait Implementations
sourceimpl<T> Debug for InstrumentBuilder<'_, T>
impl<T> Debug for InstrumentBuilder<'_, T>
sourceimpl TryFrom<InstrumentBuilder<'_, Counter<f64>>> for Counter<f64>
impl TryFrom<InstrumentBuilder<'_, Counter<f64>>> for Counter<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<InstrumentBuilder<'_, Counter<u64>>> for Counter<u64>
impl TryFrom<InstrumentBuilder<'_, Counter<u64>>> for Counter<u64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<InstrumentBuilder<'_, Histogram<f64>>> for Histogram<f64>
impl TryFrom<InstrumentBuilder<'_, Histogram<f64>>> for Histogram<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<InstrumentBuilder<'_, Histogram<i64>>> for Histogram<i64>
impl TryFrom<InstrumentBuilder<'_, Histogram<i64>>> for Histogram<i64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<InstrumentBuilder<'_, Histogram<u64>>> for Histogram<u64>
impl TryFrom<InstrumentBuilder<'_, Histogram<u64>>> for Histogram<u64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableCounter<f64>>> for ObservableCounter<f64>
impl TryFrom<InstrumentBuilder<'_, ObservableCounter<f64>>> for ObservableCounter<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableCounter<f64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableCounter<f64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableCounter<u64>>> for ObservableCounter<u64>
impl TryFrom<InstrumentBuilder<'_, ObservableCounter<u64>>> for ObservableCounter<u64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableCounter<u64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableCounter<u64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableGauge<f64>>> for ObservableGauge<f64>
impl TryFrom<InstrumentBuilder<'_, ObservableGauge<f64>>> for ObservableGauge<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<f64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<f64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableGauge<i64>>> for ObservableGauge<i64>
impl TryFrom<InstrumentBuilder<'_, ObservableGauge<i64>>> for ObservableGauge<i64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<i64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<i64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableGauge<u64>>> for ObservableGauge<u64>
impl TryFrom<InstrumentBuilder<'_, ObservableGauge<u64>>> for ObservableGauge<u64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<u64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableGauge<u64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableUpDownCounter<f64>>> for ObservableUpDownCounter<f64>
impl TryFrom<InstrumentBuilder<'_, ObservableUpDownCounter<f64>>> for ObservableUpDownCounter<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableUpDownCounter<f64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableUpDownCounter<f64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, ObservableUpDownCounter<i64>>> for ObservableUpDownCounter<i64>
impl TryFrom<InstrumentBuilder<'_, ObservableUpDownCounter<i64>>> for ObservableUpDownCounter<i64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, ObservableUpDownCounter<i64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, ObservableUpDownCounter<i64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, UpDownCounter<f64>>> for UpDownCounter<f64>
impl TryFrom<InstrumentBuilder<'_, UpDownCounter<f64>>> for UpDownCounter<f64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, UpDownCounter<f64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, UpDownCounter<f64>>
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<InstrumentBuilder<'_, UpDownCounter<i64>>> for UpDownCounter<i64>
impl TryFrom<InstrumentBuilder<'_, UpDownCounter<i64>>> for UpDownCounter<i64>
type Error = MetricsError
type Error = MetricsError
The type returned in the event of a conversion error.
sourcefn try_from(
builder: InstrumentBuilder<'_, UpDownCounter<i64>>
) -> Result<Self, Self::Error>
fn try_from(
builder: InstrumentBuilder<'_, UpDownCounter<i64>>
) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for InstrumentBuilder<'a, T>
impl<'a, T> Send for InstrumentBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for InstrumentBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for InstrumentBuilder<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for InstrumentBuilder<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more