package opentelemetry.proto.metrics.v1

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

enum AggregationTemporality

metrics.proto:278

AggregationTemporality defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.

Used in: ExponentialHistogram, Histogram, Sum

enum DataPointFlags

metrics.proto:353

DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a bit-field representing 32 distinct boolean flags. Each flag defined in this enum is a bit-mask. To test the presence of a single flag in the flags of a data point, for example, use an expression like: (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK

message Exemplar

metrics.proto:677

A representation of an exemplar, which is a sample input measurement. Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.

Used in: ExponentialHistogramDataPoint, HistogramDataPoint, NumberDataPoint

message ExponentialHistogram

metrics.proto:257

ExponentialHistogram represents the type of a metric that is calculated by aggregating as a ExponentialHistogram of all reported double measurements over a time interval.

Used in: Metric

message ExponentialHistogramDataPoint

metrics.proto:497

ExponentialHistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets.

Used in: ExponentialHistogram

message ExponentialHistogramDataPoint.Buckets

metrics.proto:567

Buckets are a set of bucket counts, encoded in a contiguous array of counts.

Used in: ExponentialHistogramDataPoint

message Gauge

metrics.proto:228

Gauge represents the type of a scalar metric that always exports the "current value" for every data point. It should be used for an "unknown" aggregation. A Gauge does not support different aggregation temporalities. Given the aggregation is unknown, points cannot be combined using the same aggregation, regardless of aggregation temporalities. Therefore, AggregationTemporality is not included. Consequently, this also means "StartTimeUnixNano" is ignored for all data points.

Used in: Metric

message Histogram

metrics.proto:247

Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.

Used in: Metric

message HistogramDataPoint

metrics.proto:416

HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram. A Histogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets. If the histogram contains the distribution of values, then both "explicit_bounds" and "bucket counts" fields must be defined. If the histogram does not contain the distribution of values, then both "explicit_bounds" and "bucket_counts" must be omitted and only "count" and "sum" are known.

Used in: Histogram

message Metric

metrics.proto:185

Defines a Metric which has one or more timeseries. The following is a brief summary of the Metric data model. For more details, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md 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 (Sum, Gauge, Histogram, Summary). - DataPoint contains timestamps, attributes, 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| | |+-----+ | +---------------------------+ Each distinct type of DataPoint represents the output of a specific aggregation function, the result of applying the DataPoint's associated function of to one or more measurements. All DataPoint types have three common fields: - Attributes includes key-value pairs associated with the data point - TimeUnixNano is required, set to the end time of the aggregation - StartTimeUnixNano is optional, but strongly encouraged for DataPoints having an AggregationTemporality field, as discussed below. Both TimeUnixNano and StartTimeUnixNano values are expressed as UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. # TimeUnixNano This field is required, having consistent interpretation across DataPoint types. TimeUnixNano is the moment corresponding to when the data point's aggregate value was captured. Data points with the 0 value for TimeUnixNano SHOULD be rejected by consumers. # StartTimeUnixNano StartTimeUnixNano in general allows detecting when a sequence of observations is unbroken. This field indicates to consumers the start time for points with cumulative and delta AggregationTemporality, and it should be included whenever possible to support correct rate calculation. Although it may be omitted when the start time is truly unknown, setting StartTimeUnixNano is strongly encouraged.

Used in: ScopeMetrics

message MetricsData

metrics.proto:56

MetricsData represents the metrics data that can be stored in a persistent storage, OR can be embedded by other protocols that transfer OTLP metrics data but do not implement the OTLP protocol. MetricsData └─── ResourceMetrics ├── Resource ├── SchemaURL └── ScopeMetrics ├── Scope ├── SchemaURL └── Metric ├── Name ├── Description ├── Unit └── data ├── Gauge ├── Sum ├── Histogram ├── ExponentialHistogram └── Summary The main difference between this message and collector protocol is that in this message there will not be any "control" or "metadata" specific to OTLP protocol. When new fields are added into this message, the OTLP request MUST be updated as well.

message NumberDataPoint

metrics.proto:368

NumberDataPoint is a single data point in a timeseries that describes the time-varying scalar value of a metric.

Used in: Gauge, Sum

message ResourceMetrics

metrics.proto:66

A collection of ScopeMetrics from a Resource.

Used in: collector.metrics.v1.ExportMetricsServiceRequest, MetricsData

message ScopeMetrics

metrics.proto:85

A collection of Metrics produced by an Scope.

Used in: ResourceMetrics

message Sum

metrics.proto:234

Sum represents the type of a scalar metric that is calculated as a sum of all reported measurements over a time interval.

Used in: Metric

message Summary

metrics.proto:271

Summary metric data are used to convey quantile summaries, a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) data type. These data points cannot always be merged in a meaningful way. While they can be useful in some applications, histogram data points are recommended for new applications.

Used in: Metric

message SummaryDataPoint

metrics.proto:610

SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary metric.

Used in: Summary

message SummaryDataPoint.ValueAtQuantile

metrics.proto:653

Represents the value at a given quantile of a distribution. To record Min and Max values following conventions are used: - The 1.0 quantile is equivalent to the maximum value observed. - The 0.0 quantile is equivalent to the minimum value observed. See the following issue for more context: https://github.com/open-telemetry/opentelemetry-proto/issues/125

Used in: SummaryDataPoint