Struct tremor_otelapis::opentelemetry::proto::metrics::v1::Metric [−][src]
Defines a Metric which has one or more timeseries.
The data model and relation between entities is shown in the diagram below. Here, “DataPoint” is the term used to refer to any one of the specific data point value types, and “points” is the term used to refer to any one of the lists of points contained in the Metric.
-
Metric is composed of a metadata and data.
-
Metadata part contains a name, description, unit.
-
Data is one of the possible types (Gauge, Sum, Histogram, etc.).
-
DataPoint contains timestamps, labels, and one of the possible value type fields.
Metric +————+ |name | |description | |unit | +————————————+ |data |—> |Gauge, Sum, Histogram, Summary, … | +————+ +————————————+
Data [One of Gauge, Sum, Histogram, Summary, …] +———–+ |… | // Metadata about the Data. |points |–+ +———–+ | | +—————————+ | |DataPoint 1 | v |+——+——+ +——+ | +—–+ ||label |label |…|label | | | 1 |–>||value1|value2|…|valueN| | +—–+ |+——+——+ +——+ | | . | |+—–+ | | . | ||value| | | . | |+—–+ | | . | +—————————+ | . | . | . | . | . | . | . | +—————————+ | . | |DataPoint M | +—–+ |+——+——+ +——+ | | M |–>||label |label |…|label | | +—–+ ||value1|value2|…|valueN| | |+——+——+ +——+ | |+—–+ | ||value| | |+—–+ | +—————————+
All DataPoint types have three common fields:
- Labels zero or more key-value pairs associated with the data point.
- StartTimeUnixNano MUST be set to the start of the interval when the data’s type includes an AggregationTemporality. This field is not set otherwise.
- TimeUnixNano MUST be set to:
- the moment when an aggregation is reported (independent of the aggregation temporality).
- the instantaneous time of the event.
Fields
name: String
name of the metric, including its DNS name prefix. It must be unique.
description: String
description of the metric, which can be used in documentation.
unit: String
unit in which the metric value is reported. Follows the format described by http://unitsofmeasure.org/ucum.html.
data: Option<Data>
Data determines the aggregation type (if any) of the metric, what is the reported value type for the data points, as well as the relatationship to the time interval over which they are reported.
TODO: Update table after the decision on: https://github.com/open-telemetry/opentelemetry-specification/issues/731. By default, metrics recording using the OpenTelemetry API are exported as (the table does not include MeasurementValueType to avoid extra rows):
Instrument Type
Counter Sum(aggregation_temporality=delta;is_monotonic=true) UpDownCounter Sum(aggregation_temporality=delta;is_monotonic=false) ValueRecorder TBD SumObserver Sum(aggregation_temporality=cumulative;is_monotonic=true) UpDownSumObserver Sum(aggregation_temporality=cumulative;is_monotonic=false) ValueObserver Gauge()
Trait Implementations
impl Clone for Metric
[src]
impl Debug for Metric
[src]
impl Default for Metric
[src]
impl Message for Metric
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<Metric> for Metric
[src]
impl StructuralPartialEq for Metric
[src]
Auto Trait Implementations
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,