[−][src]Struct opentelemetry::api::metrics::MetricOptions
MetricOptions contains some options for metrics of any kind.
Fields
description: StringDescription is an optional field describing the metric instrument.
unit: UnitUnit is an optional field describing the metric instrument. Valid values are specified according to the UCUM.
keys: Vec<Key>Keys are dimension names for the given metric.
alternate: boolAlternate defines the property of metric value dependent on a metric type.
-
for
Counter,trueimplies that the metric is an up-downCounter -
for
Gauge,trueimplies that the metric is a non-descendingGauge -
for
Measure,trueimplies that the metric supports positive and negative values
Implementations
impl MetricOptions[src]
pub fn with_description<S: Into<String>>(self, description: S) -> Self[src]
Set a description for the current set of options.
pub fn with_unit(self, unit: Unit) -> Self[src]
Set a Unit for the current set of metric options.
pub fn with_keys(self, keys: Vec<Key>) -> Self[src]
Set a list of Keys for the current set metric of options.
pub fn with_monotonic(self, _monotonic: bool) -> Self[src]
Set monotonic for the given set of metric options.
pub fn with_absolute(self, absolute: bool) -> Self[src]
Set absolute for the given set of metric options.
Trait Implementations
impl Debug for MetricOptions[src]
impl Default for MetricOptions[src]
fn default() -> MetricOptions[src]
Auto Trait Implementations
impl RefUnwindSafe for MetricOptions
impl Send for MetricOptions
impl Sync for MetricOptions
impl Unpin for MetricOptions
impl UnwindSafe for MetricOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> FutureExt for T[src]
fn with_context(self, otel_cx: OpenTelemetryContext) -> WithContext<Self>[src]
fn with_current_context(self) -> WithContext<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,