[−][src]Trait opentelemetry::api::metrics::measure::Measure
An interface for recording values where the count or rate of events is meaningful.
Associated Types
type Handle: MeasureHandle<T>
The handle type for the implementing Measure.
Required methods
fn measurement(&self, value: T) -> Measurement<LS>
Creates a Measurement object to be used by a Meter
when batch recording.
fn acquire_handle(&self, labels: &LS) -> Self::Handle
Creates a handle for this measure. The labels should contain the
keys and values for each key specified in the LabelSet.
If the labels do not contain a value for the key specified in the
LabelSet, then the missing value will be treated as unspecified.
Provided methods
fn record(&self, value: T, label_set: &LS)
Records the passed value to the value of the measure. The labels
should contain the keys and values for each key specified in
the LabelSet.
If the labels do not contain a value for the key specified in the
LabelSet, then the missing value will be treated as unspecified.
Implementors
impl Measure<f64, HashMap<Cow<'static, str>, Cow<'static, str>, RandomState>> for HistogramVec[src]
type Handle = MeasureHandle
fn measurement(&self, value: f64) -> Measurement<LabelSet>[src]
Creates a Measurement object to be used by a Meter when batch recording.
fn acquire_handle(&self, labels: &LabelSet) -> Self::Handle[src]
Creates a handle for this instrument.
impl Measure<f64, NoopLabelSet> for NoopMeasure<f64>[src]
type Handle = NoopHandle<f64>
fn measurement(&self, value: f64) -> Measurement<NoopLabelSet>[src]
Returns a no-op Measurement.
fn acquire_handle(&self, _labels: &NoopLabelSet) -> Self::Handle[src]
Returns a NoopHandle
impl Measure<i64, HashMap<Cow<'static, str>, Cow<'static, str>, RandomState>> for IntMeasure[src]
type Handle = IntMeasureHandle
fn measurement(&self, value: i64) -> Measurement<LabelSet>[src]
Creates a Measurement object to be used by a Meter when batch recording.
fn acquire_handle(&self, labels: &LabelSet) -> Self::Handle[src]
Creates a handle for this instrument.
impl Measure<i64, NoopLabelSet> for NoopMeasure<i64>[src]
type Handle = NoopHandle<i64>
fn measurement(&self, value: i64) -> Measurement<NoopLabelSet>[src]
Returns a no-op Measurement.
fn acquire_handle(&self, _labels: &NoopLabelSet) -> Self::Handle[src]
Returns a NoopHandle