From 46c7c67ca50bff43a7a1aa456daec4f5d7403e42 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 14 Apr 2020 20:39:01 -0700 Subject: [PATCH 01/14] Proposal for metric proto refactor Update metric descriptor to contain information on the data qualities. This includes: - The meaning of the time interval measurements were made over is now described by the `interval` value. - The monotonic nature of the data is captured if known. - If the data values are restricted to a subset of numbers. The `SummaryDataPoint` and `HistogramDataPoint` were merged into a unified `Distribution` message that contains statistics about the observed population of values. Adds support for multiple histogram bucket definitions and adds a linear bucket definition message. Includes an explicit minimum and maximum for a `Distribution` (#122). Removes the exemplar code (#81). This can be added back in as a more generalized case now given the new `Data` structure of the Metrics. But, it has been left for a separate PR. Unifies the common parts of the previous `*DataPoints` into a unified `Data` message. This is not complete. It likely needs better names and it certainly needs comments. Related to #125 Fixes to #81 --- gen/go/metrics/v1/metrics.pb.go | 1088 ++++++++---------- opentelemetry/proto/metrics/v1/metrics.proto | 386 +++---- 2 files changed, 643 insertions(+), 831 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 61fe5b7d3..466f75fd6 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,84 +22,96 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Type of the metric. It describes how the data is reported. -// -// A gauge is an instantaneous measurement of a value. -// -// A counter/cumulative measurement is a value accumulated over a time -// interval. In a time series, cumulative measurements should have the same -// start time, increasing values, until an event resets the cumulative value -// to zero and sets a new start time for the subsequent points. -type MetricDescriptor_Type int32 +// Interval describes how metric values are reported over time. +type MetricDescriptor_Interval int32 const ( - // Do not use this default value. - MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0 - // Integer gauge. The value can go both up and down over time. - // Corresponding values are stored in Int64DataPoint. - MetricDescriptor_GAUGE_INT64 MetricDescriptor_Type = 1 - // Floating point gauge. The value can go both up and down over time. - // Corresponding values are stored in DoubleDataPoint. - MetricDescriptor_GAUGE_DOUBLE MetricDescriptor_Type = 2 - // Histogram gauge measurement. - // Used in scenarios like a snapshot of time that current items in a queue - // have spent there. - // Corresponding values are stored in HistogramDataPoint. The count and sum of the - // histogram can go both up and down over time. Recorded values are always >= 0. - MetricDescriptor_GAUGE_HISTOGRAM MetricDescriptor_Type = 3 - // Integer counter measurement. The value cannot decrease; if value is reset then - // start_time_unix_nano should also be reset. - // Corresponding values are stored in Int64DataPoint. - MetricDescriptor_COUNTER_INT64 MetricDescriptor_Type = 4 - // Floating point counter measurement. The value cannot decrease, if - // resets then the start_time_unix_nano should also be reset. - // Recorded values are always >= 0. - // Corresponding values are stored in DoubleDataPoint. - MetricDescriptor_COUNTER_DOUBLE MetricDescriptor_Type = 5 - // Histogram cumulative measurement. - // Corresponding values are stored in HistogramDataPoint. The count and sum of the - // histogram cannot decrease; if values are reset then start_time_unix_nano - // should also be reset to the new start timestamp. - MetricDescriptor_CUMULATIVE_HISTOGRAM MetricDescriptor_Type = 6 - // Summary value. Some frameworks implemented Histograms as a summary of observations - // (usually things like request durations and response sizes). While it - // also provides a total count of observations and a sum of all observed - // values, it calculates configurable percentiles over a sliding time - // window. - // Corresponding values are stored in SummaryDataPoint. - MetricDescriptor_SUMMARY MetricDescriptor_Type = 7 + // UNSPECIFIED is the default Interval, it MUST not be used. + MetricDescriptor_UNSPECIFIED MetricDescriptor_Interval = 0 + // INSTANTANEOUS is a metric whose values are measured at a particular + // instant. + // + // If an INSTANTANEOUS metric is reported over any time interval the + // values are representative of distinct measurements within the + // interval. + MetricDescriptor_INSTANTANEOUS MetricDescriptor_Interval = 1 + // DELTA is a metric whose values are measured and successively added + // over a reporting interval. The reported value represents the change + // from the previous interval. + // + // Each reported value for a DELTA metric over a time interval is + // self-contained, the values do not depend on values in other time + // intervals. This is unlike a CUMMULATIVE metric where values are sums + // of all measured events in the time interval and all previously + // measured values of the metric. + // + // DELTA metrics are not guaranteed to be monotonic. + MetricDescriptor_DELTA MetricDescriptor_Interval = 2 + // CUMULATIVE is a metric whose values are measured and successively + // added to the lifetime total of the metric. + // + // Each reported value for a CUMULATIVE metric is the sum of all + // measurements up to and including that one. + // + // CUMULATIVE metrics are not guaranteed to be monotonic. + MetricDescriptor_CUMULATIVE MetricDescriptor_Interval = 3 ) -var MetricDescriptor_Type_name = map[int32]string{ +var MetricDescriptor_Interval_name = map[int32]string{ 0: "UNSPECIFIED", - 1: "GAUGE_INT64", - 2: "GAUGE_DOUBLE", - 3: "GAUGE_HISTOGRAM", - 4: "COUNTER_INT64", - 5: "COUNTER_DOUBLE", - 6: "CUMULATIVE_HISTOGRAM", - 7: "SUMMARY", + 1: "INSTANTANEOUS", + 2: "DELTA", + 3: "CUMULATIVE", } -var MetricDescriptor_Type_value = map[string]int32{ - "UNSPECIFIED": 0, - "GAUGE_INT64": 1, - "GAUGE_DOUBLE": 2, - "GAUGE_HISTOGRAM": 3, - "COUNTER_INT64": 4, - "COUNTER_DOUBLE": 5, - "CUMULATIVE_HISTOGRAM": 6, - "SUMMARY": 7, +var MetricDescriptor_Interval_value = map[string]int32{ + "UNSPECIFIED": 0, + "INSTANTANEOUS": 1, + "DELTA": 2, + "CUMULATIVE": 3, } -func (x MetricDescriptor_Type) String() string { - return proto.EnumName(MetricDescriptor_Type_name, int32(x)) +func (x MetricDescriptor_Interval) String() string { + return proto.EnumName(MetricDescriptor_Interval_name, int32(x)) } -func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { +func (MetricDescriptor_Interval) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 0} } +// Subset describes the subset of numbers metric values belong to if any. +type MetricDescriptor_Subset int32 + +const ( + // NONE is the default, and means the metric values do not belong to any + // subset. + MetricDescriptor_NONE MetricDescriptor_Subset = 0 + // NONNEGATIVE is the set of numbers greater than or equal to zero. + MetricDescriptor_NONNEGATIVE MetricDescriptor_Subset = 1 + // NONPOSITIVE is the set of numbers less than or equal to zero. + MetricDescriptor_NONPOSITIVE MetricDescriptor_Subset = 2 +) + +var MetricDescriptor_Subset_name = map[int32]string{ + 0: "NONE", + 1: "NONNEGATIVE", + 2: "NONPOSITIVE", +} + +var MetricDescriptor_Subset_value = map[string]int32{ + "NONE": 0, + "NONNEGATIVE": 1, + "NONPOSITIVE": 2, +} + +func (x MetricDescriptor_Subset) String() string { + return proto.EnumName(MetricDescriptor_Subset_name, int32(x)) +} + +func (MetricDescriptor_Subset) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 1} +} + // A collection of InstrumentationLibraryMetrics from a Resource. type ResourceMetrics struct { // The resource for the metrics in this message. @@ -202,7 +214,7 @@ func (m *InstrumentationLibraryMetrics) GetMetrics() []*Metric { return nil } -// Defines a Metric which has one or more timeseries. +// Metric represents timeseries produced by a telemetry system. // // The data model and relation between entities is shown in the diagram below. // @@ -245,25 +257,13 @@ func (m *InstrumentationLibraryMetrics) GetMetrics() []*Metric { // +---------------------------+ // //----------------------------------------------------------------------- -// DataPoint is a value of specific type corresponding to a given moment in -// time. Each DataPoint is timestamped. -// -// DataPoint is strongly typed: each DataPoint type has a specific Protobuf message -// depending on the value type of the metric and thus there are currently 4 DataPoint -// messages, which correspond to the types of metric values. type Metric struct { // metric_descriptor describes the Metric. - MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` - // Data is a list of one or more DataPoints for a single metric. Only one of the - // following fields is used for the data, depending on the type of the metric defined - // by MetricDescriptor.type field. - Int64DataPoints []*Int64DataPoint `protobuf:"bytes,2,rep,name=int64_data_points,json=int64DataPoints,proto3" json:"int64_data_points,omitempty"` - DoubleDataPoints []*DoubleDataPoint `protobuf:"bytes,3,rep,name=double_data_points,json=doubleDataPoints,proto3" json:"double_data_points,omitempty"` - HistogramDataPoints []*HistogramDataPoint `protobuf:"bytes,4,rep,name=histogram_data_points,json=histogramDataPoints,proto3" json:"histogram_data_points,omitempty"` - SummaryDataPoints []*SummaryDataPoint `protobuf:"bytes,5,rep,name=summary_data_points,json=summaryDataPoints,proto3" json:"summary_data_points,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` + Data []*Metric_Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Metric) Reset() { *m = Metric{} } @@ -298,34 +298,158 @@ func (m *Metric) GetMetricDescriptor() *MetricDescriptor { return nil } -func (m *Metric) GetInt64DataPoints() []*Int64DataPoint { +func (m *Metric) GetData() []*Metric_Data { if m != nil { - return m.Int64DataPoints + return m.Data } return nil } -func (m *Metric) GetDoubleDataPoints() []*DoubleDataPoint { +type Metric_Data struct { + // The set of labels that uniquely identify this timeseries. + // + // These labels take precedence over any labels with the same key defined + // in the metric descriptor. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // start_time_unix_nano is the beginning of a time interval over which + // this data point was recorded. It MUST be represented as the UNIX Epoch + // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). + // If zero, it is treated as unspecified and may be set by the receiver. + // + // If this data point is a part of a timeseries for an INSTANTANEOUS + // metric, this value is ignored. + // + // If this data point is a part of a timeseries for an DELTA, or + // CUMULATIVE metric, this value represents the instant before the + // measuring time interval began (i.e. for time t to be in the measuring + // interval than start_time_unix_nano < t <= time_unix_nano). + // + // This time MUST be reset so as to represent a new measurement lifetime + // if this data point is part of a timeseries for a CUMULATIVE metric and + // the metric value is reset to zero. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // time_unix_nano is the time when this data point was recorded. It MUST + // be represented as the UNIX Epoch time in nanoseconds (nanoseconds since + // 00:00:00 UTC on 1 January 1970). If zero, it is treated as unspecified + // and may be set by the receiver. + TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // Value is the measured value. + // + // Types that are valid to be assigned to Value: + // *Metric_Data_Int64Value + // *Metric_Data_DoubleValue + // *Metric_Data_DistributionValue + Value isMetric_Data_Value `protobuf_oneof:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metric_Data) Reset() { *m = Metric_Data{} } +func (m *Metric_Data) String() string { return proto.CompactTextString(m) } +func (*Metric_Data) ProtoMessage() {} +func (*Metric_Data) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{2, 0} +} + +func (m *Metric_Data) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metric_Data.Unmarshal(m, b) +} +func (m *Metric_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metric_Data.Marshal(b, m, deterministic) +} +func (m *Metric_Data) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metric_Data.Merge(m, src) +} +func (m *Metric_Data) XXX_Size() int { + return xxx_messageInfo_Metric_Data.Size(m) +} +func (m *Metric_Data) XXX_DiscardUnknown() { + xxx_messageInfo_Metric_Data.DiscardUnknown(m) +} + +var xxx_messageInfo_Metric_Data proto.InternalMessageInfo + +func (m *Metric_Data) GetLabels() []*v11.StringKeyValue { if m != nil { - return m.DoubleDataPoints + return m.Labels } return nil } -func (m *Metric) GetHistogramDataPoints() []*HistogramDataPoint { +func (m *Metric_Data) GetStartTimeUnixNano() uint64 { if m != nil { - return m.HistogramDataPoints + return m.StartTimeUnixNano } - return nil + return 0 +} + +func (m *Metric_Data) GetTimeUnixNano() uint64 { + if m != nil { + return m.TimeUnixNano + } + return 0 +} + +type isMetric_Data_Value interface { + isMetric_Data_Value() +} + +type Metric_Data_Int64Value struct { + Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3,oneof"` +} + +type Metric_Data_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type Metric_Data_DistributionValue struct { + DistributionValue *Distribution `protobuf:"bytes,6,opt,name=distribution_value,json=distributionValue,proto3,oneof"` } -func (m *Metric) GetSummaryDataPoints() []*SummaryDataPoint { +func (*Metric_Data_Int64Value) isMetric_Data_Value() {} + +func (*Metric_Data_DoubleValue) isMetric_Data_Value() {} + +func (*Metric_Data_DistributionValue) isMetric_Data_Value() {} + +func (m *Metric_Data) GetValue() isMetric_Data_Value { if m != nil { - return m.SummaryDataPoints + return m.Value } return nil } +func (m *Metric_Data) GetInt64Value() int64 { + if x, ok := m.GetValue().(*Metric_Data_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (m *Metric_Data) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*Metric_Data_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (m *Metric_Data) GetDistributionValue() *Distribution { + if x, ok := m.GetValue().(*Metric_Data_DistributionValue); ok { + return x.DistributionValue + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Metric_Data) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Metric_Data_Int64Value)(nil), + (*Metric_Data_DoubleValue)(nil), + (*Metric_Data_DistributionValue)(nil), + } +} + // Defines a metric type and its schema. type MetricDescriptor struct { // name of the metric, including its DNS name prefix. It must be unique. @@ -334,11 +458,15 @@ type MetricDescriptor struct { Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` - // The set of labels associated with the metric descriptor. Labels in this list apply to - // all data points. - Labels []*v11.StringKeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"` + Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` + Interval MetricDescriptor_Interval `protobuf:"varint,4,opt,name=interval,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Interval" json:"interval,omitempty"` + // monotonic is true if the metric values are entirely non-increasing, or + // entirely non-decreasing. + Monotonic bool `protobuf:"varint,5,opt,name=monotonic,proto3" json:"monotonic,omitempty"` + Subset MetricDescriptor_Subset `protobuf:"varint,6,opt,name=subset,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Subset" json:"subset,omitempty"` + // The set of labels associated with the metric descriptor. Labels in this + // list apply to all data points. + Labels []*v11.StringKeyValue `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -390,13 +518,27 @@ func (m *MetricDescriptor) GetUnit() string { return "" } -func (m *MetricDescriptor) GetType() MetricDescriptor_Type { +func (m *MetricDescriptor) GetInterval() MetricDescriptor_Interval { if m != nil { - return m.Type + return m.Interval } return MetricDescriptor_UNSPECIFIED } +func (m *MetricDescriptor) GetMonotonic() bool { + if m != nil { + return m.Monotonic + } + return false +} + +func (m *MetricDescriptor) GetSubset() MetricDescriptor_Subset { + if m != nil { + return m.Subset + } + return MetricDescriptor_NONE +} + func (m *MetricDescriptor) GetLabels() []*v11.StringKeyValue { if m != nil { return m.Labels @@ -404,576 +546,351 @@ func (m *MetricDescriptor) GetLabels() []*v11.StringKeyValue { return nil } -// Int64DataPoint is a single data point in a timeseries that describes the time-varying -// values of a int64 metric. -type Int64DataPoint struct { - // The set of labels that uniquely identify this timeseries. - Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // This is used for Counter type only. For Gauge the value is not specified and - // defaults to 0. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // value itself. - Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Int64DataPoint) Reset() { *m = Int64DataPoint{} } -func (m *Int64DataPoint) String() string { return proto.CompactTextString(m) } -func (*Int64DataPoint) ProtoMessage() {} -func (*Int64DataPoint) Descriptor() ([]byte, []int) { +// Distribution is a data point in a timeseries containing statistics for +// an observed population of values. +type Distribution struct { + // count is the number of values in a population. + Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + // sum is the total sum of all values in a population. + Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"` + Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"` + Maximum float64 `protobuf:"fixed64,4,opt,name=maximum,proto3" json:"maximum,omitempty"` + BucketCounts []uint64 `protobuf:"varint,5,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` + BucketBounds *Distribution_BucketBounds `protobuf:"bytes,6,opt,name=bucket_bounds,json=bucketBounds,proto3" json:"bucket_bounds,omitempty"` + Percentiles []*Distribution_Percentile `protobuf:"bytes,7,rep,name=percentiles,proto3" json:"percentiles,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Distribution) Reset() { *m = Distribution{} } +func (m *Distribution) String() string { return proto.CompactTextString(m) } +func (*Distribution) ProtoMessage() {} +func (*Distribution) Descriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{4} } -func (m *Int64DataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Int64DataPoint.Unmarshal(m, b) +func (m *Distribution) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution.Unmarshal(m, b) } -func (m *Int64DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Int64DataPoint.Marshal(b, m, deterministic) +func (m *Distribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution.Marshal(b, m, deterministic) } -func (m *Int64DataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int64DataPoint.Merge(m, src) +func (m *Distribution) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution.Merge(m, src) } -func (m *Int64DataPoint) XXX_Size() int { - return xxx_messageInfo_Int64DataPoint.Size(m) +func (m *Distribution) XXX_Size() int { + return xxx_messageInfo_Distribution.Size(m) } -func (m *Int64DataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_Int64DataPoint.DiscardUnknown(m) +func (m *Distribution) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution.DiscardUnknown(m) } -var xxx_messageInfo_Int64DataPoint proto.InternalMessageInfo +var xxx_messageInfo_Distribution proto.InternalMessageInfo -func (m *Int64DataPoint) GetLabels() []*v11.StringKeyValue { +func (m *Distribution) GetCount() uint64 { if m != nil { - return m.Labels + return m.Count } - return nil + return 0 } -func (m *Int64DataPoint) GetStartTimeUnixNano() uint64 { +func (m *Distribution) GetSum() float64 { if m != nil { - return m.StartTimeUnixNano + return m.Sum } return 0 } -func (m *Int64DataPoint) GetTimeUnixNano() uint64 { +func (m *Distribution) GetMinimum() float64 { if m != nil { - return m.TimeUnixNano + return m.Minimum } return 0 } -func (m *Int64DataPoint) GetValue() int64 { +func (m *Distribution) GetMaximum() float64 { if m != nil { - return m.Value + return m.Maximum } return 0 } -// DoubleDataPoint is a single data point in a timeseries that describes the time-varying -// value of a double metric. -type DoubleDataPoint struct { - // The set of labels that uniquely identify this timeseries. - Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // This is used for Counter type only. For Gauge the value is not specified and - // defaults to 0. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // value itself. - Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleDataPoint) Reset() { *m = DoubleDataPoint{} } -func (m *DoubleDataPoint) String() string { return proto.CompactTextString(m) } -func (*DoubleDataPoint) ProtoMessage() {} -func (*DoubleDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{5} -} - -func (m *DoubleDataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DoubleDataPoint.Unmarshal(m, b) -} -func (m *DoubleDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DoubleDataPoint.Marshal(b, m, deterministic) -} -func (m *DoubleDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleDataPoint.Merge(m, src) -} -func (m *DoubleDataPoint) XXX_Size() int { - return xxx_messageInfo_DoubleDataPoint.Size(m) -} -func (m *DoubleDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleDataPoint proto.InternalMessageInfo - -func (m *DoubleDataPoint) GetLabels() []*v11.StringKeyValue { +func (m *Distribution) GetBucketCounts() []uint64 { if m != nil { - return m.Labels + return m.BucketCounts } return nil } -func (m *DoubleDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *DoubleDataPoint) GetTimeUnixNano() uint64 { +func (m *Distribution) GetBucketBounds() *Distribution_BucketBounds { if m != nil { - return m.TimeUnixNano + return m.BucketBounds } - return 0 + return nil } -func (m *DoubleDataPoint) GetValue() float64 { +func (m *Distribution) GetPercentiles() []*Distribution_Percentile { if m != nil { - return m.Value + return m.Percentiles } - return 0 + return nil } -// 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. -type HistogramDataPoint struct { - // The set of labels that uniquely identify this timeseries. - Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - // Note: this field is always unspecified and ignored if MetricDescriptor.type==GAUGE_HISTOGRAM. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be non-negative. This value - // must be equal to the sum of the "count" fields in buckets if a histogram is provided. - Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. This value must be equal to the sum of the "sum" fields in buckets if - // a histogram is provided. - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` - // buckets is an optional field contains the values of histogram for each bucket. - // - // The sum of the values in the buckets "count" field must equal the value in the count field. - // - // The number of elements in buckets array must be by one greater than the - // number of elements in bucket_bounds array. - // - // Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field - // must also be present and number of elements in this field must be equal to the - // number of buckets defined by bucket_options. - Buckets []*HistogramDataPoint_Bucket `protobuf:"bytes,6,rep,name=buckets,proto3" json:"buckets,omitempty"` - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // The bucket boundaries are described by "bounds" field. - // - // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket - // at index i are: - // - // [0, bounds[i]) for i == 0 - // [bounds[i-1], bounds[i]) for 0 < i < N-1 - // [bounds[i], +infinity) for i == N-1 - // The values in bounds array must be strictly increasing and > 0. - // - // Note: only [a, b) intervals are currently supported for each bucket. If we decides - // to also support (a, b] intervals we should add support for these by defining a boolean - // value which decides what type of intervals to use. - ExplicitBounds []float64 `protobuf:"fixed64,7,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Distribution_BucketBounds struct { + // Types that are valid to be assigned to BoundKinds: + // *Distribution_BucketBounds_ExplicitBounds + // *Distribution_BucketBounds_LinearBounds + BoundKinds isDistribution_BucketBounds_BoundKinds `protobuf_oneof:"BoundKinds"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *HistogramDataPoint) Reset() { *m = HistogramDataPoint{} } -func (m *HistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*HistogramDataPoint) ProtoMessage() {} -func (*HistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6} +func (m *Distribution_BucketBounds) Reset() { *m = Distribution_BucketBounds{} } +func (m *Distribution_BucketBounds) String() string { return proto.CompactTextString(m) } +func (*Distribution_BucketBounds) ProtoMessage() {} +func (*Distribution_BucketBounds) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{4, 0} } -func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint.Unmarshal(m, b) +func (m *Distribution_BucketBounds) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_BucketBounds.Unmarshal(m, b) } -func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistogramDataPoint.Marshal(b, m, deterministic) +func (m *Distribution_BucketBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_BucketBounds.Marshal(b, m, deterministic) } -func (m *HistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint.Merge(m, src) +func (m *Distribution_BucketBounds) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_BucketBounds.Merge(m, src) } -func (m *HistogramDataPoint) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint.Size(m) +func (m *Distribution_BucketBounds) XXX_Size() int { + return xxx_messageInfo_Distribution_BucketBounds.Size(m) } -func (m *HistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint.DiscardUnknown(m) +func (m *Distribution_BucketBounds) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_BucketBounds.DiscardUnknown(m) } -var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo +var xxx_messageInfo_Distribution_BucketBounds proto.InternalMessageInfo -func (m *HistogramDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil +type isDistribution_BucketBounds_BoundKinds interface { + isDistribution_BucketBounds_BoundKinds() } -func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 +type Distribution_BucketBounds_ExplicitBounds struct { + ExplicitBounds *ExplicitBounds `protobuf:"bytes,1,opt,name=explicit_bounds,json=explicitBounds,proto3,oneof"` } -func (m *HistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 +type Distribution_BucketBounds_LinearBounds struct { + LinearBounds *LinearBounds `protobuf:"bytes,2,opt,name=linear_bounds,json=linearBounds,proto3,oneof"` } -func (m *HistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} +func (*Distribution_BucketBounds_ExplicitBounds) isDistribution_BucketBounds_BoundKinds() {} -func (m *HistogramDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} +func (*Distribution_BucketBounds_LinearBounds) isDistribution_BucketBounds_BoundKinds() {} -func (m *HistogramDataPoint) GetBuckets() []*HistogramDataPoint_Bucket { +func (m *Distribution_BucketBounds) GetBoundKinds() isDistribution_BucketBounds_BoundKinds { if m != nil { - return m.Buckets + return m.BoundKinds } return nil } -func (m *HistogramDataPoint) GetExplicitBounds() []float64 { - if m != nil { - return m.ExplicitBounds +func (m *Distribution_BucketBounds) GetExplicitBounds() *ExplicitBounds { + if x, ok := m.GetBoundKinds().(*Distribution_BucketBounds_ExplicitBounds); ok { + return x.ExplicitBounds } return nil } -// Bucket contains values for a bucket. -type HistogramDataPoint_Bucket struct { - // The number of values in each bucket of the histogram, as described by - // bucket_options. - Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - // exemplar is an optional representative value of the bucket. - Exemplar *HistogramDataPoint_Bucket_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HistogramDataPoint_Bucket) Reset() { *m = HistogramDataPoint_Bucket{} } -func (m *HistogramDataPoint_Bucket) String() string { return proto.CompactTextString(m) } -func (*HistogramDataPoint_Bucket) ProtoMessage() {} -func (*HistogramDataPoint_Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6, 0} -} - -func (m *HistogramDataPoint_Bucket) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint_Bucket.Unmarshal(m, b) -} -func (m *HistogramDataPoint_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistogramDataPoint_Bucket.Marshal(b, m, deterministic) -} -func (m *HistogramDataPoint_Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint_Bucket.Merge(m, src) -} -func (m *HistogramDataPoint_Bucket) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint_Bucket.Size(m) -} -func (m *HistogramDataPoint_Bucket) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint_Bucket.DiscardUnknown(m) -} - -var xxx_messageInfo_HistogramDataPoint_Bucket proto.InternalMessageInfo - -func (m *HistogramDataPoint_Bucket) GetCount() uint64 { - if m != nil { - return m.Count +func (m *Distribution_BucketBounds) GetLinearBounds() *LinearBounds { + if x, ok := m.GetBoundKinds().(*Distribution_BucketBounds_LinearBounds); ok { + return x.LinearBounds } - return 0 + return nil } -func (m *HistogramDataPoint_Bucket) GetExemplar() *HistogramDataPoint_Bucket_Exemplar { - if m != nil { - return m.Exemplar +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Distribution_BucketBounds) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Distribution_BucketBounds_ExplicitBounds)(nil), + (*Distribution_BucketBounds_LinearBounds)(nil), } - return nil } -// Exemplars are example points that may be used to annotate aggregated -// Histogram values. They are metadata that gives information about a -// particular value added to a Histogram bucket. -type HistogramDataPoint_Bucket_Exemplar struct { - // Value of the exemplar point. It determines which bucket the exemplar belongs to. - // If bucket_options define bounds for this bucket then this value must be within - // the defined bounds. - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - // time_unix_nano is the moment when this exemplar was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // exemplar_attachments are contextual information about the example value. - // Keys in this list must be unique. - Attachments []*v11.StringKeyValue `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Distribution_Percentile struct { + // The percentile of a distribution. Must be in the interval + // [0.0, 100.0]. + Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"` + // The value at the given percentile of a distribution. + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *HistogramDataPoint_Bucket_Exemplar) Reset() { *m = HistogramDataPoint_Bucket_Exemplar{} } -func (m *HistogramDataPoint_Bucket_Exemplar) String() string { return proto.CompactTextString(m) } -func (*HistogramDataPoint_Bucket_Exemplar) ProtoMessage() {} -func (*HistogramDataPoint_Bucket_Exemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6, 0, 0} +func (m *Distribution_Percentile) Reset() { *m = Distribution_Percentile{} } +func (m *Distribution_Percentile) String() string { return proto.CompactTextString(m) } +func (*Distribution_Percentile) ProtoMessage() {} +func (*Distribution_Percentile) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{4, 1} } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Unmarshal(m, b) +func (m *Distribution_Percentile) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_Percentile.Unmarshal(m, b) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Marshal(b, m, deterministic) +func (m *Distribution_Percentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_Percentile.Marshal(b, m, deterministic) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Merge(m, src) +func (m *Distribution_Percentile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_Percentile.Merge(m, src) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Size(m) +func (m *Distribution_Percentile) XXX_Size() int { + return xxx_messageInfo_Distribution_Percentile.Size(m) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.DiscardUnknown(m) +func (m *Distribution_Percentile) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_Percentile.DiscardUnknown(m) } -var xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar proto.InternalMessageInfo +var xxx_messageInfo_Distribution_Percentile proto.InternalMessageInfo -func (m *HistogramDataPoint_Bucket_Exemplar) GetValue() float64 { +func (m *Distribution_Percentile) GetPercentile() float64 { if m != nil { - return m.Value + return m.Percentile } return 0 } -func (m *HistogramDataPoint_Bucket_Exemplar) GetTimeUnixNano() uint64 { +func (m *Distribution_Percentile) GetValue() float64 { if m != nil { - return m.TimeUnixNano + return m.Value } return 0 } -func (m *HistogramDataPoint_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { - if m != nil { - return m.Attachments - } - return nil -} - -// SummaryDataPoint is a single data point in a timeseries that describes the time-varying -// values of a Summary metric. -type SummaryDataPoint struct { - // The set of labels that uniquely identify this timeseries. - Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // The total number of recorded values since start_time. Optional since - // some systems don't expose this. - Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` - // The total sum of recorded values since start_time. Optional since some - // systems don't expose this. If count is zero then this field must be zero. - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` - // A list of values at different percentiles of the distribution calculated - // from the current snapshot. The percentiles must be strictly increasing. - PercentileValues []*SummaryDataPoint_ValueAtPercentile `protobuf:"bytes,6,rep,name=percentile_values,json=percentileValues,proto3" json:"percentile_values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// ExplicitBounds define arbitrarily defined bucket bounds. +// +// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket at +// index i are: +// +// (-infinity, bounds[i]) for i == 0 +// [bounds[i-1], bounds[i]) for 0 < i < N-1 +// [bounds[i], +infinity) for i == N-1 +type ExplicitBounds struct { + // The values in bounds array must be monotonically increasing. + Bounds []float64 `protobuf:"fixed64,3,rep,packed,name=bounds,proto3" json:"bounds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SummaryDataPoint) Reset() { *m = SummaryDataPoint{} } -func (m *SummaryDataPoint) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint) ProtoMessage() {} -func (*SummaryDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{7} +func (m *ExplicitBounds) Reset() { *m = ExplicitBounds{} } +func (m *ExplicitBounds) String() string { return proto.CompactTextString(m) } +func (*ExplicitBounds) ProtoMessage() {} +func (*ExplicitBounds) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{5} } -func (m *SummaryDataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SummaryDataPoint.Unmarshal(m, b) -} -func (m *SummaryDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SummaryDataPoint.Marshal(b, m, deterministic) +func (m *ExplicitBounds) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExplicitBounds.Unmarshal(m, b) } -func (m *SummaryDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint.Merge(m, src) -} -func (m *SummaryDataPoint) XXX_Size() int { - return xxx_messageInfo_SummaryDataPoint.Size(m) -} -func (m *SummaryDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint proto.InternalMessageInfo - -func (m *SummaryDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil +func (m *ExplicitBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExplicitBounds.Marshal(b, m, deterministic) } - -func (m *SummaryDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 +func (m *ExplicitBounds) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExplicitBounds.Merge(m, src) } - -func (m *SummaryDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 +func (m *ExplicitBounds) XXX_Size() int { + return xxx_messageInfo_ExplicitBounds.Size(m) } - -func (m *SummaryDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 +func (m *ExplicitBounds) XXX_DiscardUnknown() { + xxx_messageInfo_ExplicitBounds.DiscardUnknown(m) } -func (m *SummaryDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} +var xxx_messageInfo_ExplicitBounds proto.InternalMessageInfo -func (m *SummaryDataPoint) GetPercentileValues() []*SummaryDataPoint_ValueAtPercentile { +func (m *ExplicitBounds) GetBounds() []float64 { if m != nil { - return m.PercentileValues + return m.Bounds } return nil } -// Represents the value at a given percentile of a distribution. +// LinearBounds define evenly spaced bucket bounds. // -// To record Min and Max values following conventions are used: -// - The 100th percentile is equivalent to the maximum value observed. -// - The 0th percentile is equivalent to the minimum value observed. +// This defines number + 2 (= N) buckets. The boundaries for buckets at +// index i are: // -// See the following issue for more context: -// https://github.com/open-telemetry/opentelemetry-proto/issues/125 -type SummaryDataPoint_ValueAtPercentile struct { - // The percentile of a distribution. Must be in the interval - // [0.0, 100.0]. - Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"` - // The value at the given percentile of a distribution. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` +// (-infinity, minimum) for i == 0 +// [minimum + ((i-1)*width), minimum + (i*width)) for 0 < i < N-1 +// [minimum + (number*width), +infinity) for i == N-1 +type LinearBounds struct { + Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"` + Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *SummaryDataPoint_ValueAtPercentile) Reset() { *m = SummaryDataPoint_ValueAtPercentile{} } -func (m *SummaryDataPoint_ValueAtPercentile) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint_ValueAtPercentile) ProtoMessage() {} -func (*SummaryDataPoint_ValueAtPercentile) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{7, 0} +func (m *LinearBounds) Reset() { *m = LinearBounds{} } +func (m *LinearBounds) String() string { return proto.CompactTextString(m) } +func (*LinearBounds) ProtoMessage() {} +func (*LinearBounds) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{6} } -func (m *SummaryDataPoint_ValueAtPercentile) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Unmarshal(m, b) +func (m *LinearBounds) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LinearBounds.Unmarshal(m, b) } -func (m *SummaryDataPoint_ValueAtPercentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Marshal(b, m, deterministic) +func (m *LinearBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LinearBounds.Marshal(b, m, deterministic) } -func (m *SummaryDataPoint_ValueAtPercentile) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Merge(m, src) +func (m *LinearBounds) XXX_Merge(src proto.Message) { + xxx_messageInfo_LinearBounds.Merge(m, src) } -func (m *SummaryDataPoint_ValueAtPercentile) XXX_Size() int { - return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Size(m) +func (m *LinearBounds) XXX_Size() int { + return xxx_messageInfo_LinearBounds.Size(m) } -func (m *SummaryDataPoint_ValueAtPercentile) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.DiscardUnknown(m) +func (m *LinearBounds) XXX_DiscardUnknown() { + xxx_messageInfo_LinearBounds.DiscardUnknown(m) } -var xxx_messageInfo_SummaryDataPoint_ValueAtPercentile proto.InternalMessageInfo +var xxx_messageInfo_LinearBounds proto.InternalMessageInfo -func (m *SummaryDataPoint_ValueAtPercentile) GetPercentile() float64 { +func (m *LinearBounds) GetNumber() uint64 { if m != nil { - return m.Percentile + return m.Number } return 0 } -func (m *SummaryDataPoint_ValueAtPercentile) GetValue() float64 { +func (m *LinearBounds) GetWidth() float64 { if m != nil { - return m.Value + return m.Width + } + return 0 +} + +func (m *LinearBounds) GetMinimum() float64 { + if m != nil { + return m.Minimum } return 0 } func init() { - proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Interval", MetricDescriptor_Interval_name, MetricDescriptor_Interval_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Subset", MetricDescriptor_Subset_name, MetricDescriptor_Subset_value) proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") proto.RegisterType((*InstrumentationLibraryMetrics)(nil), "opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics") proto.RegisterType((*Metric)(nil), "opentelemetry.proto.metrics.v1.Metric") + proto.RegisterType((*Metric_Data)(nil), "opentelemetry.proto.metrics.v1.Metric.Data") proto.RegisterType((*MetricDescriptor)(nil), "opentelemetry.proto.metrics.v1.MetricDescriptor") - proto.RegisterType((*Int64DataPoint)(nil), "opentelemetry.proto.metrics.v1.Int64DataPoint") - proto.RegisterType((*DoubleDataPoint)(nil), "opentelemetry.proto.metrics.v1.DoubleDataPoint") - proto.RegisterType((*HistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint") - proto.RegisterType((*HistogramDataPoint_Bucket)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket") - proto.RegisterType((*HistogramDataPoint_Bucket_Exemplar)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar") - proto.RegisterType((*SummaryDataPoint)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint") - proto.RegisterType((*SummaryDataPoint_ValueAtPercentile)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile") + proto.RegisterType((*Distribution)(nil), "opentelemetry.proto.metrics.v1.Distribution") + proto.RegisterType((*Distribution_BucketBounds)(nil), "opentelemetry.proto.metrics.v1.Distribution.BucketBounds") + proto.RegisterType((*Distribution_Percentile)(nil), "opentelemetry.proto.metrics.v1.Distribution.Percentile") + proto.RegisterType((*ExplicitBounds)(nil), "opentelemetry.proto.metrics.v1.ExplicitBounds") + proto.RegisterType((*LinearBounds)(nil), "opentelemetry.proto.metrics.v1.LinearBounds") } func init() { @@ -981,65 +898,66 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 952 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xdf, 0x6e, 0x2a, 0x45, - 0x18, 0x77, 0x59, 0x0a, 0xf5, 0xa3,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95, 0x7e, 0x98, 0x91, 0x86, 0x0f, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, - 0x28, 0xab, 0x2b, 0x39, 0xfb, 0x0b, 0x00, 0x00, + // 972 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe2, 0xc6, + 0x13, 0xc7, 0x18, 0x08, 0x0c, 0x84, 0x90, 0xd5, 0xe9, 0xfe, 0x08, 0xfd, 0xef, 0xca, 0x71, 0x55, + 0x45, 0xdb, 0x8b, 0x69, 0xd2, 0x6b, 0x4f, 0xf7, 0x50, 0x5d, 0x43, 0x70, 0x1b, 0x74, 0x39, 0x83, + 0x16, 0x88, 0xd4, 0x4a, 0x57, 0x64, 0xc3, 0x2a, 0xb7, 0xaa, 0xbd, 0x46, 0xf6, 0x9a, 0x26, 0x1f, + 0xa0, 0xdf, 0xae, 0x2f, 0x95, 0xfa, 0x5a, 0xa9, 0xcf, 0xfd, 0x12, 0xad, 0xbc, 0xbb, 0x26, 0x26, + 0x22, 0x21, 0x51, 0xdf, 0x66, 0x7e, 0xf3, 0x9b, 0xdf, 0xce, 0xcc, 0x0e, 0x66, 0xe1, 0x85, 0xbf, + 0x20, 0x8c, 0x13, 0x97, 0x78, 0x84, 0x07, 0x57, 0x9d, 0x45, 0xe0, 0x73, 0xbf, 0x13, 0xdb, 0x74, + 0x16, 0x76, 0x96, 0x87, 0x89, 0x69, 0x88, 0x00, 0x7a, 0xba, 0xc6, 0x96, 0xa0, 0x91, 0x50, 0x96, + 0x87, 0x8d, 0xcf, 0x36, 0xa9, 0xcd, 0x7c, 0xcf, 0xf3, 0x59, 0x2c, 0x26, 0x2d, 0x99, 0xd6, 0x30, + 0x36, 0x71, 0x03, 0x12, 0xfa, 0x51, 0x30, 0x23, 0x31, 0x3b, 0xb1, 0x25, 0xbf, 0xf5, 0x97, 0x06, + 0x7b, 0x58, 0x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90, 0x40, 0x6d, 0xa2, + 0xf2, 0xe2, 0x73, 0x7e, 0xa1, 0x73, 0xfe, 0x21, 0x39, 0x47, 0x38, 0xb7, 0xaf, 0x63, 0x97, 0xc3, + 0x33, 0xea, 0x6f, 0x99, 0x4a, 0xb7, 0xa2, 0xfe, 0xb0, 0x87, 0x71, 0x60, 0xa8, 0xfd, 0xf8, 0xe6, + 0x82, 0xf2, 0x0f, 0x91, 0x13, 0xff, 0x80, 0x3b, 0x71, 0xea, 0xc1, 0xf5, 0xc3, 0x67, 0x4d, 0xe9, + 0x40, 0x3e, 0x83, 0x2e, 0x08, 0xeb, 0x5c, 0xa4, 0xdf, 0x61, 0x4e, 0x41, 0x04, 0xbe, 0xfc, 0x37, + 0x00, 0x00, 0xff, 0xff, 0x1c, 0xc7, 0xd3, 0x3a, 0xb0, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index ebfb24271..15dd77909 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -44,7 +44,7 @@ message InstrumentationLibraryMetrics { repeated Metric metrics = 2; } -// Defines a Metric which has one or more timeseries. +// Metric represents timeseries produced by a telemetry system. // // The data model and relation between entities is shown in the diagram below. // @@ -87,23 +87,50 @@ message InstrumentationLibraryMetrics { // +---------------------------+ // //----------------------------------------------------------------------- -// DataPoint is a value of specific type corresponding to a given moment in -// time. Each DataPoint is timestamped. -// -// DataPoint is strongly typed: each DataPoint type has a specific Protobuf message -// depending on the value type of the metric and thus there are currently 4 DataPoint -// messages, which correspond to the types of metric values. message Metric { // metric_descriptor describes the Metric. MetricDescriptor metric_descriptor = 1; - // Data is a list of one or more DataPoints for a single metric. Only one of the - // following fields is used for the data, depending on the type of the metric defined - // by MetricDescriptor.type field. - repeated Int64DataPoint int64_data_points = 2; - repeated DoubleDataPoint double_data_points = 3; - repeated HistogramDataPoint histogram_data_points = 4; - repeated SummaryDataPoint summary_data_points = 5; + repeated Data data = 2; + + message Data { + // The set of labels that uniquely identify this timeseries. + // + // These labels take precedence over any labels with the same key defined + // in the metric descriptor. + repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; + + // start_time_unix_nano is the beginning of a time interval over which + // this data point was recorded. It MUST be represented as the UNIX Epoch + // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). + // If zero, it is treated as unspecified and may be set by the receiver. + // + // If this data point is a part of a timeseries for an INSTANTANEOUS + // metric, this value is ignored. + // + // If this data point is a part of a timeseries for an DELTA, or + // CUMULATIVE metric, this value represents the instant before the + // measuring time interval began (i.e. for time t to be in the measuring + // interval than start_time_unix_nano < t <= time_unix_nano). + // + // This time MUST be reset so as to represent a new measurement lifetime + // if this data point is part of a timeseries for a CUMULATIVE metric and + // the metric value is reset to zero. + fixed64 start_time_unix_nano = 2; + + // time_unix_nano is the time when this data point was recorded. It MUST + // be represented as the UNIX Epoch time in nanoseconds (nanoseconds since + // 00:00:00 UTC on 1 January 1970). If zero, it is treated as unspecified + // and may be set by the receiver. + fixed64 time_unix_nano = 3; + + // Value is the measured value. + oneof Value { + int64 int64_value = 4; + double double_value = 5; + Distribution distribution_value = 6; + } + } } // Defines a metric type and its schema. @@ -118,246 +145,89 @@ message MetricDescriptor { // described by http://unitsofmeasure.org/ucum.html. string unit = 3; - // Type of the metric. It describes how the data is reported. - // - // A gauge is an instantaneous measurement of a value. - // - // A counter/cumulative measurement is a value accumulated over a time - // interval. In a time series, cumulative measurements should have the same - // start time, increasing values, until an event resets the cumulative value - // to zero and sets a new start time for the subsequent points. - enum Type { - // Do not use this default value. + // Interval describes how metric values are reported over time. + enum Interval { + // UNSPECIFIED is the default Interval, it MUST not be used. UNSPECIFIED = 0; - // Integer gauge. The value can go both up and down over time. - // Corresponding values are stored in Int64DataPoint. - GAUGE_INT64 = 1; - - // Floating point gauge. The value can go both up and down over time. - // Corresponding values are stored in DoubleDataPoint. - GAUGE_DOUBLE = 2; - - // Histogram gauge measurement. - // Used in scenarios like a snapshot of time that current items in a queue - // have spent there. - // Corresponding values are stored in HistogramDataPoint. The count and sum of the - // histogram can go both up and down over time. Recorded values are always >= 0. - GAUGE_HISTOGRAM = 3; - - // Integer counter measurement. The value cannot decrease; if value is reset then - // start_time_unix_nano should also be reset. - // Corresponding values are stored in Int64DataPoint. - COUNTER_INT64 = 4; - - // Floating point counter measurement. The value cannot decrease, if - // resets then the start_time_unix_nano should also be reset. - // Recorded values are always >= 0. - // Corresponding values are stored in DoubleDataPoint. - COUNTER_DOUBLE = 5; - - // Histogram cumulative measurement. - // Corresponding values are stored in HistogramDataPoint. The count and sum of the - // histogram cannot decrease; if values are reset then start_time_unix_nano - // should also be reset to the new start timestamp. - CUMULATIVE_HISTOGRAM = 6; - - // Summary value. Some frameworks implemented Histograms as a summary of observations - // (usually things like request durations and response sizes). While it - // also provides a total count of observations and a sum of all observed - // values, it calculates configurable percentiles over a sliding time - // window. - // Corresponding values are stored in SummaryDataPoint. - SUMMARY = 7; + // INSTANTANEOUS is a metric whose values are measured at a particular + // instant. + // + // If an INSTANTANEOUS metric is reported over any time interval the + // values are representative of distinct measurements within the + // interval. + INSTANTANEOUS = 1; + + // DELTA is a metric whose values are measured and successively added + // over a reporting interval. The reported value represents the change + // from the previous interval. + // + // Each reported value for a DELTA metric over a time interval is + // self-contained, the values do not depend on values in other time + // intervals. This is unlike a CUMMULATIVE metric where values are sums + // of all measured events in the time interval and all previously + // measured values of the metric. + // + // DELTA metrics are not guaranteed to be monotonic. + DELTA = 2; + + // CUMULATIVE is a metric whose values are measured and successively + // added to the lifetime total of the metric. + // + // Each reported value for a CUMULATIVE metric is the sum of all + // measurements up to and including that one. + // + // CUMULATIVE metrics are not guaranteed to be monotonic. + CUMULATIVE = 3; } - Type type = 4; + Interval interval = 4; - // The set of labels associated with the metric descriptor. Labels in this list apply to - // all data points. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 5; -} + // monotonic is true if the metric values are entirely non-increasing, or + // entirely non-decreasing. + bool monotonic = 5; -// Int64DataPoint is a single data point in a timeseries that describes the time-varying -// values of a int64 metric. -message Int64DataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // This is used for Counter type only. For Gauge the value is not specified and - // defaults to 0. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - fixed64 start_time_unix_nano = 2; - - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 3; - - // value itself. - int64 value = 4; -} + // Subset describes the subset of numbers metric values belong to if any. + enum Subset { + // NONE is the default, and means the metric values do not belong to any + // subset. + NONE = 0; -// DoubleDataPoint is a single data point in a timeseries that describes the time-varying -// value of a double metric. -message DoubleDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // This is used for Counter type only. For Gauge the value is not specified and - // defaults to 0. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - fixed64 start_time_unix_nano = 2; - - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 3; - - // value itself. - double value = 4; -} + // NONNEGATIVE is the set of numbers greater than or equal to zero. + NONNEGATIVE = 1; -// 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. -message HistogramDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - // Note: this field is always unspecified and ignored if MetricDescriptor.type==GAUGE_HISTOGRAM. - fixed64 start_time_unix_nano = 2; - - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. This value - // must be equal to the sum of the "count" fields in buckets if a histogram is provided. - uint64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. This value must be equal to the sum of the "sum" fields in buckets if - // a histogram is provided. - double sum = 5; - - // Bucket contains values for a bucket. - message Bucket { - // The number of values in each bucket of the histogram, as described by - // bucket_options. - uint64 count = 1; - - // Exemplars are example points that may be used to annotate aggregated - // Histogram values. They are metadata that gives information about a - // particular value added to a Histogram bucket. - message Exemplar { - // Value of the exemplar point. It determines which bucket the exemplar belongs to. - // If bucket_options define bounds for this bucket then this value must be within - // the defined bounds. - double value = 1; - - // time_unix_nano is the moment when this exemplar was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 2; - - // exemplar_attachments are contextual information about the example value. - // Keys in this list must be unique. - repeated opentelemetry.proto.common.v1.StringKeyValue attachments = 3; - } - - // exemplar is an optional representative value of the bucket. - Exemplar exemplar = 2; + // NONPOSITIVE is the set of numbers less than or equal to zero. + NONPOSITIVE = 2; } + Subset subset = 6; - // buckets is an optional field contains the values of histogram for each bucket. - // - // The sum of the values in the buckets "count" field must equal the value in the count field. - // - // The number of elements in buckets array must be by one greater than the - // number of elements in bucket_bounds array. - // - // Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field - // must also be present and number of elements in this field must be equal to the - // number of buckets defined by bucket_options. - repeated Bucket buckets = 6; - - // A histogram may optionally contain the distribution of the values in the population. - // In that case one of the option fields below and "buckets" field both must be defined. - // Otherwise all option fields and "buckets" field must be omitted in which case the - // distribution of values in the histogram is unknown and only the total count and sum are known. - - // explicit_bounds is the only supported bucket option currently. - // TODO: Add more bucket options. - - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // The bucket boundaries are described by "bounds" field. - // - // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket - // at index i are: - // - // [0, bounds[i]) for i == 0 - // [bounds[i-1], bounds[i]) for 0 < i < N-1 - // [bounds[i], +infinity) for i == N-1 - // The values in bounds array must be strictly increasing and > 0. - // - // Note: only [a, b) intervals are currently supported for each bucket. If we decides - // to also support (a, b] intervals we should add support for these by defining a boolean - // value which decides what type of intervals to use. - repeated double explicit_bounds = 7; + // The set of labels associated with the metric descriptor. Labels in this + // list apply to all data points. + repeated opentelemetry.proto.common.v1.StringKeyValue labels = 7; } -// SummaryDataPoint is a single data point in a timeseries that describes the time-varying -// values of a Summary metric. -message SummaryDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - fixed64 start_time_unix_nano = 2; - - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 3; - - // The total number of recorded values since start_time. Optional since - // some systems don't expose this. - uint64 count = 4; - - // The total sum of recorded values since start_time. Optional since some - // systems don't expose this. If count is zero then this field must be zero. - double sum = 5; - - // Represents the value at a given percentile of a distribution. - // - // To record Min and Max values following conventions are used: - // - The 100th percentile is equivalent to the maximum value observed. - // - The 0th percentile is equivalent to the minimum value observed. - // - // See the following issue for more context: - // https://github.com/open-telemetry/opentelemetry-proto/issues/125 - message ValueAtPercentile { +// Distribution is a data point in a timeseries containing statistics for +// an observed population of values. +message Distribution { + // count is the number of values in a population. + uint64 count = 1; + + // sum is the total sum of all values in a population. + double sum = 2; + + double minimum = 3; + double maximum = 4; + + repeated uint64 bucket_counts = 5; + + message BucketBounds { + oneof BoundKinds { + ExplicitBounds explicit_bounds = 1; + LinearBounds linear_bounds = 2; + } + } + BucketBounds bucket_bounds = 6; + + message Percentile { // The percentile of a distribution. Must be in the interval // [0.0, 100.0]. double percentile = 1; @@ -365,8 +235,32 @@ message SummaryDataPoint { // The value at the given percentile of a distribution. double value = 2; } + repeated Percentile percentiles = 7; +} - // A list of values at different percentiles of the distribution calculated - // from the current snapshot. The percentiles must be strictly increasing. - repeated ValueAtPercentile percentile_values = 6; +// ExplicitBounds define arbitrarily defined bucket bounds. +// +// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket at +// index i are: +// +// (-infinity, bounds[i]) for i == 0 +// [bounds[i-1], bounds[i]) for 0 < i < N-1 +// [bounds[i], +infinity) for i == N-1 +message ExplicitBounds { + // The values in bounds array must be monotonically increasing. + repeated double bounds = 3; +} + +// LinearBounds define evenly spaced bucket bounds. +// +// This defines number + 2 (= N) buckets. The boundaries for buckets at +// index i are: +// +// (-infinity, minimum) for i == 0 +// [minimum + ((i-1)*width), minimum + (i*width)) for 0 < i < N-1 +// [minimum + (number*width), +infinity) for i == N-1 +message LinearBounds { + uint64 number = 1; + double width = 2; + double minimum = 3; } From 0f4982964afe2d8ddf970716a9a3da851fbc7cb7 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 14:56:40 -0700 Subject: [PATCH 02/14] Update opentelemetry/proto/metrics/v1/metrics.proto Co-Authored-By: Yuri Shkuro --- opentelemetry/proto/metrics/v1/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 15dd77909..67a2e5ab3 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -44,7 +44,7 @@ message InstrumentationLibraryMetrics { repeated Metric metrics = 2; } -// Metric represents timeseries produced by a telemetry system. +// Metric represents a timeseries produced by a telemetry system. // // The data model and relation between entities is shown in the diagram below. // From e573ee46fdfd6399eb95ce89257ef526f34a1b75 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 14:56:54 -0700 Subject: [PATCH 03/14] Update opentelemetry/proto/metrics/v1/metrics.proto Co-Authored-By: Yuri Shkuro --- opentelemetry/proto/metrics/v1/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 67a2e5ab3..2fbdef293 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -108,7 +108,7 @@ message Metric { // If this data point is a part of a timeseries for an INSTANTANEOUS // metric, this value is ignored. // - // If this data point is a part of a timeseries for an DELTA, or + // If this data point is a part of a timeseries for a DELTA, or // CUMULATIVE metric, this value represents the instant before the // measuring time interval began (i.e. for time t to be in the measuring // interval than start_time_unix_nano < t <= time_unix_nano). From 9cbe6ed3c4df1ce9d58d48ccacebb68fd0381b03 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 15:25:19 -0700 Subject: [PATCH 04/14] Rename `Interval` to `Temporality` --- gen/go/metrics/v1/metrics.pb.go | 158 +++++++++---------- opentelemetry/proto/metrics/v1/metrics.proto | 8 +- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 466f75fd6..435cfad58 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,19 +22,19 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Interval describes how metric values are reported over time. -type MetricDescriptor_Interval int32 +// Temporality describes how metric values are reported over time. +type MetricDescriptor_Temporality int32 const ( - // UNSPECIFIED is the default Interval, it MUST not be used. - MetricDescriptor_UNSPECIFIED MetricDescriptor_Interval = 0 + // UNSPECIFIED is the default Temporality, it MUST not be used. + MetricDescriptor_UNSPECIFIED MetricDescriptor_Temporality = 0 // INSTANTANEOUS is a metric whose values are measured at a particular // instant. // // If an INSTANTANEOUS metric is reported over any time interval the // values are representative of distinct measurements within the // interval. - MetricDescriptor_INSTANTANEOUS MetricDescriptor_Interval = 1 + MetricDescriptor_INSTANTANEOUS MetricDescriptor_Temporality = 1 // DELTA is a metric whose values are measured and successively added // over a reporting interval. The reported value represents the change // from the previous interval. @@ -46,7 +46,7 @@ const ( // measured values of the metric. // // DELTA metrics are not guaranteed to be monotonic. - MetricDescriptor_DELTA MetricDescriptor_Interval = 2 + MetricDescriptor_DELTA MetricDescriptor_Temporality = 2 // CUMULATIVE is a metric whose values are measured and successively // added to the lifetime total of the metric. // @@ -54,28 +54,28 @@ const ( // measurements up to and including that one. // // CUMULATIVE metrics are not guaranteed to be monotonic. - MetricDescriptor_CUMULATIVE MetricDescriptor_Interval = 3 + MetricDescriptor_CUMULATIVE MetricDescriptor_Temporality = 3 ) -var MetricDescriptor_Interval_name = map[int32]string{ +var MetricDescriptor_Temporality_name = map[int32]string{ 0: "UNSPECIFIED", 1: "INSTANTANEOUS", 2: "DELTA", 3: "CUMULATIVE", } -var MetricDescriptor_Interval_value = map[string]int32{ +var MetricDescriptor_Temporality_value = map[string]int32{ "UNSPECIFIED": 0, "INSTANTANEOUS": 1, "DELTA": 2, "CUMULATIVE": 3, } -func (x MetricDescriptor_Interval) String() string { - return proto.EnumName(MetricDescriptor_Interval_name, int32(x)) +func (x MetricDescriptor_Temporality) String() string { + return proto.EnumName(MetricDescriptor_Temporality_name, int32(x)) } -func (MetricDescriptor_Interval) EnumDescriptor() ([]byte, []int) { +func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 0} } @@ -458,8 +458,8 @@ type MetricDescriptor struct { Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - Interval MetricDescriptor_Interval `protobuf:"varint,4,opt,name=interval,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Interval" json:"interval,omitempty"` + Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` + Temporality MetricDescriptor_Temporality `protobuf:"varint,4,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` // monotonic is true if the metric values are entirely non-increasing, or // entirely non-decreasing. Monotonic bool `protobuf:"varint,5,opt,name=monotonic,proto3" json:"monotonic,omitempty"` @@ -518,9 +518,9 @@ func (m *MetricDescriptor) GetUnit() string { return "" } -func (m *MetricDescriptor) GetInterval() MetricDescriptor_Interval { +func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { if m != nil { - return m.Interval + return m.Temporality } return MetricDescriptor_UNSPECIFIED } @@ -879,7 +879,7 @@ func (m *LinearBounds) GetMinimum() float64 { } func init() { - proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Interval", MetricDescriptor_Interval_name, MetricDescriptor_Interval_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality", MetricDescriptor_Temporality_name, MetricDescriptor_Temporality_value) proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Subset", MetricDescriptor_Subset_name, MetricDescriptor_Subset_value) proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") proto.RegisterType((*InstrumentationLibraryMetrics)(nil), "opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics") @@ -898,66 +898,66 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 972 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe2, 0xc6, - 0x13, 0xc7, 0x18, 0x08, 0x0c, 0x84, 0x90, 0xd5, 0xe9, 0xfe, 0x08, 0xfd, 0xef, 0xca, 0x71, 0x55, - 0x45, 0xdb, 0x8b, 0x69, 0xd2, 0x6b, 0x4f, 0xf7, 0x50, 0x5d, 0x43, 0x70, 0x1b, 0x74, 0x39, 0x83, - 0x16, 0x88, 0xd4, 0x4a, 0x57, 0x64, 0xc3, 0x2a, 0xb7, 0xaa, 0xbd, 0x46, 0xf6, 0x9a, 0x26, 0x1f, - 0xa0, 0xdf, 0xae, 0x2f, 0x95, 0xfa, 0x5a, 0xa9, 0xcf, 0xfd, 0x12, 0xad, 0xbc, 0xbb, 0x26, 0x26, - 0x22, 0x21, 0x51, 0xdf, 0x66, 0x7e, 0xf3, 0x9b, 0xdf, 0xce, 0xcc, 0x0e, 0x66, 0xe1, 0x85, 0xbf, - 0x20, 0x8c, 0x13, 0x97, 0x78, 0x84, 0x07, 0x57, 0x9d, 0x45, 0xe0, 0x73, 0xbf, 0x13, 0xdb, 0x74, - 0x16, 0x76, 0x96, 0x87, 0x89, 0x69, 0x88, 0x00, 0x7a, 0xba, 0xc6, 0x96, 0xa0, 0x91, 0x50, 0x96, - 0x87, 0x8d, 0xcf, 0x36, 0xa9, 0xcd, 0x7c, 0xcf, 0xf3, 0x59, 0x2c, 0x26, 0x2d, 0x99, 0xd6, 0x30, - 0x36, 0x71, 0x03, 0x12, 0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, 0x5b, - 0xc3, 0xca, 0x6b, 0x9d, 0x43, 0x25, 0x5d, 0x5b, 0xcc, 0x63, 0x91, 0xe7, 0x90, 0x40, 0x6d, 0xa2, - 0xf2, 0xe2, 0x73, 0x7e, 0xa1, 0x73, 0xfe, 0x21, 0x39, 0x47, 0x38, 0xb7, 0xaf, 0x63, 0x97, 0xc3, - 0x33, 0xea, 0x6f, 0x99, 0x4a, 0xb7, 0xa2, 0xfe, 0xb0, 0x87, 0x71, 0x60, 0xa8, 0xfd, 0xf8, 0xe6, - 0x82, 0xf2, 0x0f, 0x91, 0x13, 0xff, 0x80, 0x3b, 0x71, 0xea, 0xc1, 0xf5, 0xc3, 0x67, 0x4d, 0xe9, - 0x40, 0x3e, 0x83, 0x2e, 0x08, 0xeb, 0x5c, 0xa4, 0xdf, 0x61, 0x4e, 0x41, 0x04, 0xbe, 0xfc, 0x37, - 0x00, 0x00, 0xff, 0xff, 0x1c, 0xc7, 0xd3, 0x3a, 0xb0, 0x09, 0x00, 0x00, + // 975 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe2, 0x46, + 0x10, 0xc6, 0x18, 0xc8, 0x31, 0x10, 0x42, 0x56, 0xa7, 0x2b, 0x42, 0xbd, 0x2b, 0xc7, 0x55, 0x15, + 0x6d, 0x2f, 0xa6, 0x49, 0xaf, 0x3d, 0x55, 0x6a, 0x75, 0x0d, 0xc1, 0x6d, 0xd0, 0x71, 0x06, 0x2d, + 0x10, 0xa9, 0x95, 0xee, 0x90, 0x0d, 0xab, 0xdc, 0xaa, 0xf6, 0x1a, 0xd9, 0xeb, 0x34, 0xf9, 0x01, + 0xfd, 0x77, 0x7d, 0xa9, 0xd4, 0xd7, 0x4a, 0xfd, 0x15, 0x7d, 0x6d, 0xe5, 0xdd, 0x35, 0x98, 0x88, + 0x84, 0x44, 0x7d, 0x9b, 0xf9, 0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xae, 0x90, 0x35, + 0x04, 0x8d, 0x60, 0xd7, 0xa5, 0x8c, 0xd8, 0x41, 0x22, 0x9c, 0xbd, 0xdb, 0x47, 0xa1, 0x2f, 0x92, + 0x96, 0xb2, 0x65, 0x37, 0xe5, 0x77, 0xca, 0x00, 0xc2, 0x7a, 0x4d, 0xd9, 0x3c, 0xac, 0x77, 0x00, + 0x56, 0x9d, 0xa2, 0x27, 0x00, 0xab, 0x5e, 0x45, 0x1b, 0x1a, 0x4e, 0x21, 0xf1, 0xe2, 0xc8, 0xaf, + 0x93, 0x5c, 0x12, 0xe9, 0x34, 0x5b, 0x50, 0x59, 0x6f, 0x05, 0x3d, 0x82, 0x82, 0xaa, 0x58, 0x6f, + 0xe8, 0x2d, 0x0d, 0x2b, 0xaf, 0x79, 0x06, 0xe5, 0x74, 0x6d, 0x31, 0x8f, 0x45, 0x9e, 0x43, 0x02, + 0xb5, 0x89, 0xca, 0x8b, 0xcf, 0xf9, 0x95, 0xce, 0xf9, 0xfb, 0xe4, 0x1c, 0xe1, 0xdc, 0xbc, 0x8e, + 0x1d, 0x0e, 0x4f, 0xa9, 0xbf, 0x65, 0x2a, 0x9d, 0xb2, 0xfa, 0xf3, 0x1e, 0xc6, 0x81, 0xa1, 0xf6, + 0xf3, 0xab, 0x73, 0xca, 0xdf, 0x47, 0x4e, 0xfc, 0x1b, 0x6e, 0xc7, 0xa9, 0x07, 0xab, 0x47, 0xd0, + 0x9a, 0xd2, 0x81, 0x7c, 0x12, 0x9d, 0x13, 0xd6, 0x3e, 0x4f, 0xbf, 0xc9, 0x9c, 0x82, 0x08, 0x7c, + 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xba, 0xc3, 0xfe, 0xbc, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 15dd77909..10229448d 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -145,9 +145,9 @@ message MetricDescriptor { // described by http://unitsofmeasure.org/ucum.html. string unit = 3; - // Interval describes how metric values are reported over time. - enum Interval { - // UNSPECIFIED is the default Interval, it MUST not be used. + // Temporality describes how metric values are reported over time. + enum Temporality { + // UNSPECIFIED is the default Temporality, it MUST not be used. UNSPECIFIED = 0; // INSTANTANEOUS is a metric whose values are measured at a particular @@ -180,7 +180,7 @@ message MetricDescriptor { // CUMULATIVE metrics are not guaranteed to be monotonic. CUMULATIVE = 3; } - Interval interval = 4; + Temporality temporality = 4; // monotonic is true if the metric values are entirely non-increasing, or // entirely non-decreasing. From bfd1b5ea0a55a2b46693de3553cac5d03487f7f3 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 15:43:06 -0700 Subject: [PATCH 05/14] Update DELTA comment --- gen/go/metrics/v1/metrics.pb.go | 6 +++--- opentelemetry/proto/metrics/v1/metrics.proto | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 930879358..910834021 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -35,9 +35,9 @@ const ( // values are representative of distinct measurements within the // interval. MetricDescriptor_INSTANTANEOUS MetricDescriptor_Temporality = 1 - // DELTA is a metric whose values are measured and successively added - // over a reporting interval. The reported value represents the change - // from the previous interval. + // DELTA is a metric whose values are measured and successively + // aggregated over a reporting interval. The reported value represents + // the change from the previous interval. // // Each reported value for a DELTA metric over a time interval is // self-contained, the values do not depend on values in other time diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index d1ec88010..c49be4fd8 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -158,9 +158,9 @@ message MetricDescriptor { // interval. INSTANTANEOUS = 1; - // DELTA is a metric whose values are measured and successively added - // over a reporting interval. The reported value represents the change - // from the previous interval. + // DELTA is a metric whose values are measured and successively + // aggregated over a reporting interval. The reported value represents + // the change from the previous interval. // // Each reported value for a DELTA metric over a time interval is // self-contained, the values do not depend on values in other time From 05dec81c6d43b675ffa9baf019da048929949193 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 15:48:05 -0700 Subject: [PATCH 06/14] Subset -> Domain --- gen/go/metrics/v1/metrics.pb.go | 152 +++++++++---------- opentelemetry/proto/metrics/v1/metrics.proto | 8 +- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 910834021..aa6a4c034 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -79,36 +79,36 @@ func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 0} } -// Subset describes the subset of numbers metric values belong to if any. -type MetricDescriptor_Subset int32 +// Domain describes the set of numbers metric values belong to if any. +type MetricDescriptor_Domain int32 const ( // NONE is the default, and means the metric values do not belong to any - // subset. - MetricDescriptor_NONE MetricDescriptor_Subset = 0 + // particular domain other than the value type itself. + MetricDescriptor_NONE MetricDescriptor_Domain = 0 // NONNEGATIVE is the set of numbers greater than or equal to zero. - MetricDescriptor_NONNEGATIVE MetricDescriptor_Subset = 1 + MetricDescriptor_NONNEGATIVE MetricDescriptor_Domain = 1 // NONPOSITIVE is the set of numbers less than or equal to zero. - MetricDescriptor_NONPOSITIVE MetricDescriptor_Subset = 2 + MetricDescriptor_NONPOSITIVE MetricDescriptor_Domain = 2 ) -var MetricDescriptor_Subset_name = map[int32]string{ +var MetricDescriptor_Domain_name = map[int32]string{ 0: "NONE", 1: "NONNEGATIVE", 2: "NONPOSITIVE", } -var MetricDescriptor_Subset_value = map[string]int32{ +var MetricDescriptor_Domain_value = map[string]int32{ "NONE": 0, "NONNEGATIVE": 1, "NONPOSITIVE": 2, } -func (x MetricDescriptor_Subset) String() string { - return proto.EnumName(MetricDescriptor_Subset_name, int32(x)) +func (x MetricDescriptor_Domain) String() string { + return proto.EnumName(MetricDescriptor_Domain_name, int32(x)) } -func (MetricDescriptor_Subset) EnumDescriptor() ([]byte, []int) { +func (MetricDescriptor_Domain) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 1} } @@ -463,7 +463,7 @@ type MetricDescriptor struct { // monotonic is true if the metric values are entirely non-increasing, or // entirely non-decreasing. Monotonic bool `protobuf:"varint,5,opt,name=monotonic,proto3" json:"monotonic,omitempty"` - Subset MetricDescriptor_Subset `protobuf:"varint,6,opt,name=subset,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Subset" json:"subset,omitempty"` + Domain MetricDescriptor_Domain `protobuf:"varint,6,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. Labels []*v11.StringKeyValue `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty"` @@ -532,9 +532,9 @@ func (m *MetricDescriptor) GetMonotonic() bool { return false } -func (m *MetricDescriptor) GetSubset() MetricDescriptor_Subset { +func (m *MetricDescriptor) GetDomain() MetricDescriptor_Domain { if m != nil { - return m.Subset + return m.Domain } return MetricDescriptor_NONE } @@ -880,7 +880,7 @@ func (m *LinearBounds) GetMinimum() float64 { func init() { proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality", MetricDescriptor_Temporality_name, MetricDescriptor_Temporality_value) - proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Subset", MetricDescriptor_Subset_name, MetricDescriptor_Subset_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Domain", MetricDescriptor_Domain_name, MetricDescriptor_Domain_value) proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") proto.RegisterType((*InstrumentationLibraryMetrics)(nil), "opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics") proto.RegisterType((*Metric)(nil), "opentelemetry.proto.metrics.v1.Metric") @@ -899,65 +899,65 @@ func init() { var fileDescriptor_3c3112f9fa006917 = []byte{ // 975 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe2, 0x46, - 0x10, 0xc6, 0x18, 0xc8, 0x31, 0x10, 0x42, 0x56, 0xa7, 0x2b, 0x42, 0xbd, 0x2b, 0xc7, 0x55, 0x15, - 0x6d, 0x2f, 0xa6, 0x49, 0xaf, 0x3d, 0x55, 0x6a, 0x75, 0x0d, 0xc1, 0x6d, 0xd0, 0x71, 0x06, 0x2d, - 0x10, 0xa9, 0x95, 0xee, 0x90, 0x0d, 0xab, 0xdc, 0xaa, 0xf6, 0x1a, 0xd9, 0xeb, 0x34, 0xf9, 0x01, - 0xfd, 0x77, 0x7d, 0xa9, 0xd4, 0xd7, 0x4a, 0xfd, 0x15, 0x7d, 0x6d, 0xe5, 0xdd, 0x35, 0x98, 0x88, - 0x84, 0x44, 0x7d, 0x9b, 0xf9, 0xe6, 0x9b, 0x6f, 0x67, 0x66, 0x07, 0xb3, 0xf0, 0xdc, 0x5f, 0x10, - 0xc6, 0x89, 0x4b, 0x3c, 0xc2, 0x83, 0xab, 0xf6, 0x22, 0xf0, 0xb9, 0xdf, 0x8e, 0x6d, 0x3a, 0x0b, - 0xdb, 0x17, 0x87, 0x89, 0x69, 0x88, 0x00, 0x7a, 0xb2, 0xc6, 0x96, 0xa0, 0x91, 0x50, 0x2e, 0x0e, - 0xeb, 0x9f, 0x6d, 0x52, 0x9b, 0xf9, 0x9e, 0xe7, 0xb3, 0x58, 0x4c, 0x5a, 0x32, 0xad, 0x6e, 0x6c, - 0xe2, 0x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 0xb9, 0x18, - 0x4b, 0x11, 0x0b, 0x1b, 0xbd, 0x83, 0x12, 0x27, 0xde, 0xc2, 0x0f, 0x6c, 0x97, 0xf2, 0x2b, 0x31, - 0x8e, 0xca, 0xd1, 0xb7, 0xf7, 0xdd, 0x27, 0x63, 0xbc, 0xd2, 0xc0, 0x69, 0x41, 0xf4, 0x21, 0x14, - 0x3d, 0x9f, 0xf9, 0xdc, 0x67, 0x74, 0x26, 0x06, 0xf9, 0x00, 0xaf, 0x00, 0x34, 0x80, 0x42, 0x18, - 0x39, 0x21, 0xe1, 0x62, 0x70, 0x95, 0xa3, 0x97, 0xf7, 0x3e, 0x78, 0x24, 0xd2, 0xb1, 0x92, 0x49, - 0xed, 0xde, 0xce, 0xff, 0xd8, 0xbd, 0x66, 0x1f, 0x4a, 0xa9, 0x8e, 0xd0, 0x1e, 0x94, 0x26, 0xd6, - 0x68, 0x68, 0x9e, 0xf4, 0x7e, 0xe8, 0x99, 0xdd, 0x6a, 0x06, 0xed, 0xc3, 0x6e, 0xcf, 0x1a, 0x8d, - 0x8f, 0xad, 0xf1, 0xb1, 0x65, 0x0e, 0x26, 0xa3, 0xaa, 0x86, 0x8a, 0x90, 0xef, 0x9a, 0xfd, 0xf1, - 0x71, 0x35, 0x8b, 0x2a, 0x00, 0x27, 0x93, 0x37, 0x93, 0xfe, 0xf1, 0xb8, 0x77, 0x66, 0x56, 0xf5, - 0xe6, 0x0b, 0x28, 0xc8, 0x32, 0xd1, 0x03, 0xc8, 0x59, 0x03, 0xcb, 0xac, 0x66, 0x62, 0x49, 0x6b, - 0x60, 0x59, 0xe6, 0x8f, 0x92, 0xa4, 0x29, 0x60, 0x38, 0x18, 0xf5, 0x04, 0x90, 0x6d, 0xfe, 0x95, - 0x83, 0x72, 0x7a, 0x4f, 0xd0, 0x43, 0xc8, 0xcf, 0xfc, 0x88, 0x71, 0x71, 0xeb, 0x39, 0x2c, 0x1d, - 0x54, 0x05, 0x3d, 0x8c, 0x3c, 0x71,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94, 0xd0, 0x69, 0x06, 0x97, 0xc8, 0x0a, + 0x82, 0x06, 0xb0, 0xeb, 0x51, 0x46, 0xdc, 0x20, 0x11, 0xce, 0xde, 0xed, 0xa3, 0xd0, 0x95, 0x49, + 0x0b, 0xd9, 0xa2, 0x97, 0xf2, 0x5b, 0x45, 0x00, 0x69, 0xbd, 0xa6, 0x6c, 0x16, 0x56, 0x5b, 0x00, + 0xcb, 0x4e, 0xd1, 0x13, 0x80, 0x65, 0xaf, 0xb2, 0x0d, 0x03, 0xa7, 0x90, 0x78, 0x71, 0xd4, 0xd7, + 0x49, 0x2d, 0x89, 0x72, 0xea, 0x0d, 0x28, 0xad, 0xb6, 0x82, 0x1e, 0x41, 0x5e, 0x57, 0x6c, 0xd6, + 0xcc, 0x86, 0x81, 0xb5, 0x57, 0x3f, 0x83, 0x62, 0xba, 0xb6, 0x98, 0xc7, 0x22, 0x7f, 0x42, 0x02, + 0xbd, 0x89, 0xda, 0x8b, 0xcf, 0xf9, 0x95, 0xce, 0xc4, 0xfb, 0xe4, 0x1c, 0xe9, 0xdc, 0xbc, 0x8e, + 0x2d, 0x01, 0x4f, 0x29, 0xdf, 0x30, 0x95, 0x56, 0x51, 0xff, 0x79, 0xf7, 0xe3, 0x40, 0xdf, 0xf8, + 0xf9, 0xd5, 0x39, 0x15, 0xef, 0xa3, 0x49, 0xfc, 0x1b, 0x6e, 0xc6, 0xa9, 0x07, 0xcb, 0x47, 0xd0, + 0x8a, 0xd2, 0x81, 0x7a, 0x12, 0x9d, 0x13, 0xd6, 0x3c, 0x4f, 0xbf, 0xc9, 0x26, 0x79, 0x19, 0xf8, + 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0xca, 0x75, 0xf1, 0xbc, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index c49be4fd8..1f091638f 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -186,10 +186,10 @@ message MetricDescriptor { // entirely non-decreasing. bool monotonic = 5; - // Subset describes the subset of numbers metric values belong to if any. - enum Subset { + // Domain describes the set of numbers metric values belong to if any. + enum Domain { // NONE is the default, and means the metric values do not belong to any - // subset. + // particular domain other than the value type itself. NONE = 0; // NONNEGATIVE is the set of numbers greater than or equal to zero. @@ -198,7 +198,7 @@ message MetricDescriptor { // NONPOSITIVE is the set of numbers less than or equal to zero. NONPOSITIVE = 2; } - Subset subset = 6; + Domain domain = 6; // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. From 95e313635e0820a18b275f0c67b9ee233aa16abf Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 15:59:06 -0700 Subject: [PATCH 07/14] Revert to the old Histogram format --- gen/go/metrics/v1/metrics.pb.go | 446 +++++++------------ opentelemetry/proto/metrics/v1/metrics.proto | 104 +++-- 2 files changed, 228 insertions(+), 322 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index aa6a4c034..ca1f536da 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -552,15 +552,40 @@ type Distribution struct { // count is the number of values in a population. Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // sum is the total sum of all values in a population. - Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"` - Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"` - Maximum float64 `protobuf:"fixed64,4,opt,name=maximum,proto3" json:"maximum,omitempty"` - BucketCounts []uint64 `protobuf:"varint,5,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` - BucketBounds *Distribution_BucketBounds `protobuf:"bytes,6,opt,name=bucket_bounds,json=bucketBounds,proto3" json:"bucket_bounds,omitempty"` - Percentiles []*Distribution_Percentile `protobuf:"bytes,7,rep,name=percentiles,proto3" json:"percentiles,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"` + // minimum is the minimum observed value in a population. + Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"` + // maximum is the maximum observed value in a population. + Maximum float64 `protobuf:"fixed64,4,opt,name=maximum,proto3" json:"maximum,omitempty"` + // buckets is an optional field contains the values of histogram for each bucket. + // + // The sum of the values in the buckets "count" field must equal the value in the count field. + // + // The number of elements in buckets array must be by one greater than the + // number of elements in bucket_bounds array. + // + // Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field + // must also be present and number of elements in this field must be equal to the + // number of buckets defined by bucket_options. + Buckets []*Distribution_Bucket `protobuf:"bytes,5,rep,name=buckets,proto3" json:"buckets,omitempty"` + // explicit_bounds specifies buckets with explicitly defined bounds for values. + // The bucket boundaries are described by "bounds" field. + // + // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket + // at index i are: + // + // [0, bounds[i]) for i == 0 + // [bounds[i-1], bounds[i]) for 0 < i < N-1 + // [bounds[i], +infinity) for i == N-1 + // The values in bounds array must be strictly increasing and > 0. + // + // Note: only [a, b) intervals are currently supported for each bucket. If we decides + // to also support (a, b] intervals we should add support for these by defining a boolean + // value which decides what type of intervals to use. + ExplicitBounds []float64 `protobuf:"fixed64,6,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Distribution) Reset() { *m = Distribution{} } @@ -616,266 +641,134 @@ func (m *Distribution) GetMaximum() float64 { return 0 } -func (m *Distribution) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *Distribution) GetBucketBounds() *Distribution_BucketBounds { +func (m *Distribution) GetBuckets() []*Distribution_Bucket { if m != nil { - return m.BucketBounds + return m.Buckets } return nil } -func (m *Distribution) GetPercentiles() []*Distribution_Percentile { +func (m *Distribution) GetExplicitBounds() []float64 { if m != nil { - return m.Percentiles + return m.ExplicitBounds } return nil } -type Distribution_BucketBounds struct { - // Types that are valid to be assigned to BoundKinds: - // *Distribution_BucketBounds_ExplicitBounds - // *Distribution_BucketBounds_LinearBounds - BoundKinds isDistribution_BucketBounds_BoundKinds `protobuf_oneof:"BoundKinds"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// Bucket contains values for a bucket. +type Distribution_Bucket struct { + // The number of values in each bucket of the histogram, as described by + // bucket_options. + Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + // exemplar is an optional representative value of the bucket. + Exemplar *Distribution_Bucket_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Distribution_BucketBounds) Reset() { *m = Distribution_BucketBounds{} } -func (m *Distribution_BucketBounds) String() string { return proto.CompactTextString(m) } -func (*Distribution_BucketBounds) ProtoMessage() {} -func (*Distribution_BucketBounds) Descriptor() ([]byte, []int) { +func (m *Distribution_Bucket) Reset() { *m = Distribution_Bucket{} } +func (m *Distribution_Bucket) String() string { return proto.CompactTextString(m) } +func (*Distribution_Bucket) ProtoMessage() {} +func (*Distribution_Bucket) Descriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{4, 0} } -func (m *Distribution_BucketBounds) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_BucketBounds.Unmarshal(m, b) -} -func (m *Distribution_BucketBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_BucketBounds.Marshal(b, m, deterministic) +func (m *Distribution_Bucket) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_Bucket.Unmarshal(m, b) } -func (m *Distribution_BucketBounds) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_BucketBounds.Merge(m, src) +func (m *Distribution_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_Bucket.Marshal(b, m, deterministic) } -func (m *Distribution_BucketBounds) XXX_Size() int { - return xxx_messageInfo_Distribution_BucketBounds.Size(m) +func (m *Distribution_Bucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_Bucket.Merge(m, src) } -func (m *Distribution_BucketBounds) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_BucketBounds.DiscardUnknown(m) +func (m *Distribution_Bucket) XXX_Size() int { + return xxx_messageInfo_Distribution_Bucket.Size(m) } - -var xxx_messageInfo_Distribution_BucketBounds proto.InternalMessageInfo - -type isDistribution_BucketBounds_BoundKinds interface { - isDistribution_BucketBounds_BoundKinds() -} - -type Distribution_BucketBounds_ExplicitBounds struct { - ExplicitBounds *ExplicitBounds `protobuf:"bytes,1,opt,name=explicit_bounds,json=explicitBounds,proto3,oneof"` -} - -type Distribution_BucketBounds_LinearBounds struct { - LinearBounds *LinearBounds `protobuf:"bytes,2,opt,name=linear_bounds,json=linearBounds,proto3,oneof"` +func (m *Distribution_Bucket) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_Bucket.DiscardUnknown(m) } -func (*Distribution_BucketBounds_ExplicitBounds) isDistribution_BucketBounds_BoundKinds() {} +var xxx_messageInfo_Distribution_Bucket proto.InternalMessageInfo -func (*Distribution_BucketBounds_LinearBounds) isDistribution_BucketBounds_BoundKinds() {} - -func (m *Distribution_BucketBounds) GetBoundKinds() isDistribution_BucketBounds_BoundKinds { +func (m *Distribution_Bucket) GetCount() uint64 { if m != nil { - return m.BoundKinds - } - return nil -} - -func (m *Distribution_BucketBounds) GetExplicitBounds() *ExplicitBounds { - if x, ok := m.GetBoundKinds().(*Distribution_BucketBounds_ExplicitBounds); ok { - return x.ExplicitBounds - } - return nil -} - -func (m *Distribution_BucketBounds) GetLinearBounds() *LinearBounds { - if x, ok := m.GetBoundKinds().(*Distribution_BucketBounds_LinearBounds); ok { - return x.LinearBounds - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Distribution_BucketBounds) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Distribution_BucketBounds_ExplicitBounds)(nil), - (*Distribution_BucketBounds_LinearBounds)(nil), - } -} - -type Distribution_Percentile struct { - // The percentile of a distribution. Must be in the interval - // [0.0, 100.0]. - Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"` - // The value at the given percentile of a distribution. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Distribution_Percentile) Reset() { *m = Distribution_Percentile{} } -func (m *Distribution_Percentile) String() string { return proto.CompactTextString(m) } -func (*Distribution_Percentile) ProtoMessage() {} -func (*Distribution_Percentile) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{4, 1} -} - -func (m *Distribution_Percentile) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Distribution_Percentile.Unmarshal(m, b) -} -func (m *Distribution_Percentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Distribution_Percentile.Marshal(b, m, deterministic) -} -func (m *Distribution_Percentile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Distribution_Percentile.Merge(m, src) -} -func (m *Distribution_Percentile) XXX_Size() int { - return xxx_messageInfo_Distribution_Percentile.Size(m) -} -func (m *Distribution_Percentile) XXX_DiscardUnknown() { - xxx_messageInfo_Distribution_Percentile.DiscardUnknown(m) -} - -var xxx_messageInfo_Distribution_Percentile proto.InternalMessageInfo - -func (m *Distribution_Percentile) GetPercentile() float64 { - if m != nil { - return m.Percentile - } - return 0 -} - -func (m *Distribution_Percentile) GetValue() float64 { - if m != nil { - return m.Value + return m.Count } return 0 } -// ExplicitBounds define arbitrarily defined bucket bounds. -// -// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket at -// index i are: -// -// (-infinity, bounds[i]) for i == 0 -// [bounds[i-1], bounds[i]) for 0 < i < N-1 -// [bounds[i], +infinity) for i == N-1 -type ExplicitBounds struct { - // The values in bounds array must be monotonically increasing. - Bounds []float64 `protobuf:"fixed64,3,rep,packed,name=bounds,proto3" json:"bounds,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ExplicitBounds) Reset() { *m = ExplicitBounds{} } -func (m *ExplicitBounds) String() string { return proto.CompactTextString(m) } -func (*ExplicitBounds) ProtoMessage() {} -func (*ExplicitBounds) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{5} -} - -func (m *ExplicitBounds) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExplicitBounds.Unmarshal(m, b) -} -func (m *ExplicitBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExplicitBounds.Marshal(b, m, deterministic) -} -func (m *ExplicitBounds) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExplicitBounds.Merge(m, src) -} -func (m *ExplicitBounds) XXX_Size() int { - return xxx_messageInfo_ExplicitBounds.Size(m) -} -func (m *ExplicitBounds) XXX_DiscardUnknown() { - xxx_messageInfo_ExplicitBounds.DiscardUnknown(m) -} - -var xxx_messageInfo_ExplicitBounds proto.InternalMessageInfo - -func (m *ExplicitBounds) GetBounds() []float64 { +func (m *Distribution_Bucket) GetExemplar() *Distribution_Bucket_Exemplar { if m != nil { - return m.Bounds + return m.Exemplar } return nil } -// LinearBounds define evenly spaced bucket bounds. -// -// This defines number + 2 (= N) buckets. The boundaries for buckets at -// index i are: -// -// (-infinity, minimum) for i == 0 -// [minimum + ((i-1)*width), minimum + (i*width)) for 0 < i < N-1 -// [minimum + (number*width), +infinity) for i == N-1 -type LinearBounds struct { - Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"` - Minimum float64 `protobuf:"fixed64,3,opt,name=minimum,proto3" json:"minimum,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// Exemplars are example points that may be used to annotate aggregated +// Histogram values. They are metadata that gives information about a +// particular value added to a Histogram bucket. +type Distribution_Bucket_Exemplar struct { + // Value of the exemplar point. It determines which bucket the exemplar belongs to. + // If bucket_options define bounds for this bucket then this value must be within + // the defined bounds. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + // time_unix_nano is the moment when this exemplar was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // exemplar_attachments are contextual information about the example value. + // Keys in this list must be unique. + Attachments []*v11.StringKeyValue `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *LinearBounds) Reset() { *m = LinearBounds{} } -func (m *LinearBounds) String() string { return proto.CompactTextString(m) } -func (*LinearBounds) ProtoMessage() {} -func (*LinearBounds) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6} +func (m *Distribution_Bucket_Exemplar) Reset() { *m = Distribution_Bucket_Exemplar{} } +func (m *Distribution_Bucket_Exemplar) String() string { return proto.CompactTextString(m) } +func (*Distribution_Bucket_Exemplar) ProtoMessage() {} +func (*Distribution_Bucket_Exemplar) Descriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{4, 0, 0} } -func (m *LinearBounds) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LinearBounds.Unmarshal(m, b) +func (m *Distribution_Bucket_Exemplar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_Bucket_Exemplar.Unmarshal(m, b) } -func (m *LinearBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LinearBounds.Marshal(b, m, deterministic) +func (m *Distribution_Bucket_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_Bucket_Exemplar.Marshal(b, m, deterministic) } -func (m *LinearBounds) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinearBounds.Merge(m, src) +func (m *Distribution_Bucket_Exemplar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_Bucket_Exemplar.Merge(m, src) } -func (m *LinearBounds) XXX_Size() int { - return xxx_messageInfo_LinearBounds.Size(m) +func (m *Distribution_Bucket_Exemplar) XXX_Size() int { + return xxx_messageInfo_Distribution_Bucket_Exemplar.Size(m) } -func (m *LinearBounds) XXX_DiscardUnknown() { - xxx_messageInfo_LinearBounds.DiscardUnknown(m) +func (m *Distribution_Bucket_Exemplar) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_Bucket_Exemplar.DiscardUnknown(m) } -var xxx_messageInfo_LinearBounds proto.InternalMessageInfo +var xxx_messageInfo_Distribution_Bucket_Exemplar proto.InternalMessageInfo -func (m *LinearBounds) GetNumber() uint64 { +func (m *Distribution_Bucket_Exemplar) GetValue() float64 { if m != nil { - return m.Number + return m.Value } return 0 } -func (m *LinearBounds) GetWidth() float64 { +func (m *Distribution_Bucket_Exemplar) GetTimeUnixNano() uint64 { if m != nil { - return m.Width + return m.TimeUnixNano } return 0 } -func (m *LinearBounds) GetMinimum() float64 { +func (m *Distribution_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { if m != nil { - return m.Minimum + return m.Attachments } - return 0 + return nil } func init() { @@ -887,10 +780,8 @@ func init() { proto.RegisterType((*Metric_Data)(nil), "opentelemetry.proto.metrics.v1.Metric.Data") proto.RegisterType((*MetricDescriptor)(nil), "opentelemetry.proto.metrics.v1.MetricDescriptor") proto.RegisterType((*Distribution)(nil), "opentelemetry.proto.metrics.v1.Distribution") - proto.RegisterType((*Distribution_BucketBounds)(nil), "opentelemetry.proto.metrics.v1.Distribution.BucketBounds") - proto.RegisterType((*Distribution_Percentile)(nil), "opentelemetry.proto.metrics.v1.Distribution.Percentile") - proto.RegisterType((*ExplicitBounds)(nil), "opentelemetry.proto.metrics.v1.ExplicitBounds") - proto.RegisterType((*LinearBounds)(nil), "opentelemetry.proto.metrics.v1.LinearBounds") + proto.RegisterType((*Distribution_Bucket)(nil), "opentelemetry.proto.metrics.v1.Distribution.Bucket") + proto.RegisterType((*Distribution_Bucket_Exemplar)(nil), "opentelemetry.proto.metrics.v1.Distribution.Bucket.Exemplar") } func init() { @@ -898,66 +789,61 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 975 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0x1a, 0x47, - 0x10, 0xe6, 0x38, 0x8c, 0xe3, 0x01, 0x63, 0xbc, 0x8a, 0x52, 0x84, 0x9a, 0x94, 0x90, 0xaa, 0xa2, - 0x6d, 0x7c, 0xd4, 0x6e, 0xda, 0xa8, 0x52, 0xab, 0xd4, 0x98, 0x6b, 0x8d, 0x42, 0x0e, 0xb4, 0x80, - 0xa5, 0x56, 0x4a, 0xd0, 0x01, 0x2b, 0x67, 0xd5, 0xbb, 0x5d, 0x74, 0xb7, 0xe7, 0xda, 0x3f, 0xa0, - 0xff, 0xae, 0x2f, 0x95, 0xfa, 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, 0xa5, 0x8b, - 0x6e, 0xd4, 0xb7, 0xd4, 0xda, 0x74, 0x9e, 0xad, 0xd3, 0x94, 0xd0, 0x69, 0x06, 0x97, 0xc8, 0x0a, - 0x82, 0x06, 0xb0, 0xeb, 0x51, 0x46, 0xdc, 0x20, 0x11, 0xce, 0xde, 0xed, 0xa3, 0xd0, 0x95, 0x49, - 0x0b, 0xd9, 0xa2, 0x97, 0xf2, 0x5b, 0x45, 0x00, 0x69, 0xbd, 0xa6, 0x6c, 0x16, 0x56, 0x5b, 0x00, - 0xcb, 0x4e, 0xd1, 0x13, 0x80, 0x65, 0xaf, 0xb2, 0x0d, 0x03, 0xa7, 0x90, 0x78, 0x71, 0xd4, 0xd7, - 0x49, 0x2d, 0x89, 0x72, 0xea, 0x0d, 0x28, 0xad, 0xb6, 0x82, 0x1e, 0x41, 0x5e, 0x57, 0x6c, 0xd6, - 0xcc, 0x86, 0x81, 0xb5, 0x57, 0x3f, 0x83, 0x62, 0xba, 0xb6, 0x98, 0xc7, 0x22, 0x7f, 0x42, 0x02, - 0xbd, 0x89, 0xda, 0x8b, 0xcf, 0xf9, 0x95, 0xce, 0xc4, 0xfb, 0xe4, 0x1c, 0xe9, 0xdc, 0xbc, 0x8e, - 0x2d, 0x01, 0x4f, 0x29, 0xdf, 0x30, 0x95, 0x56, 0x51, 0xff, 0x79, 0xf7, 0xe3, 0x40, 0xdf, 0xf8, - 0xf9, 0xd5, 0x39, 0x15, 0xef, 0xa3, 0x49, 0xfc, 0x1b, 0x6e, 0xc6, 0xa9, 0x07, 0xcb, 0x47, 0xd0, - 0x8a, 0xd2, 0x81, 0x7a, 0x12, 0x9d, 0x13, 0xd6, 0x3c, 0x4f, 0xbf, 0xc9, 0x26, 0x79, 0x19, 0xf8, - 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0xca, 0x75, 0xf1, 0xbc, 0x09, 0x00, 0x00, + // 895 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 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8, 0x27, 0xf7, 0x19, 0x61, 0xa7, 0xab, + 0x6b, 0x49, 0xaa, 0x81, 0x3f, 0x86, 0x1d, 0xb6, 0x5a, 0x2e, 0xf8, 0x8c, 0xab, 0xc9, 0x54, 0x46, + 0x62, 0x1e, 0xd6, 0x8b, 0x4d, 0xab, 0x8d, 0x48, 0x35, 0x85, 0xbb, 0x1a, 0x6d, 0xfc, 0x96, 0x83, + 0xa2, 0x29, 0xbe, 0xe5, 0x78, 0x3f, 0x42, 0x99, 0xad, 0x98, 0xbf, 0x5c, 0xd0, 0x40, 0x9f, 0xd1, + 0xde, 0x3c, 0x9c, 0x6b, 0x3a, 0x73, 0xdc, 0x44, 0x83, 0x5c, 0xaa, 0x35, 0x7e, 0x47, 0x50, 0x4e, + 0xe1, 0x78, 0x73, 0xf3, 0x03, 0x46, 0xda, 0x17, 0xb3, 0x58, 0xf3, 0x45, 0xc9, 0xad, 0xf9, 0xa2, + 0x0c, 0xc0, 0xa6, 0x4a, 0xd1, 0xd9, 0xab, 0xf8, 0xfb, 0x1f, 0xd6, 0xad, 0xff, 0x33, 0x78, 0x59, + 0x85, 0xae, 0x82, 0x47, 0x5c, 0x6e, 0x38, 0x65, 0x77, 0x3b, 0xf9, 0x53, 0x3b, 0x8d, 0x13, 0xa7, + 0xe8, 0xa7, 0x67, 0x67, 0x5c, 0xbd, 0x8a, 0xa6, 0xf1, 0x16, 0x9d, 0xb8, 0x74, 0xef, 0xea, 0x71, + 0x70, 0x4d, 0x69, 0xcf, 0x3c, 0x15, 0xce, 0x98, 0xe8, 0x9c, 0x65, 0xdf, 0x2a, 0xd3, 0xa2, 0x4e, + 0x3c, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x50, 0xe1, 0xd3, 0x01, 0xd4, 0x08, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 1f091638f..3cfd72c75 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -214,53 +214,73 @@ message Distribution { // sum is the total sum of all values in a population. double sum = 2; + // minimum is the minimum observed value in a population. double minimum = 3; - double maximum = 4; - repeated uint64 bucket_counts = 5; + // maximum is the maximum observed value in a population. + double maximum = 4; - message BucketBounds { - oneof BoundKinds { - ExplicitBounds explicit_bounds = 1; - LinearBounds linear_bounds = 2; + // Bucket contains values for a bucket. + message Bucket { + // The number of values in each bucket of the histogram, as described by + // bucket_options. + uint64 count = 1; + + // Exemplars are example points that may be used to annotate aggregated + // Histogram values. They are metadata that gives information about a + // particular value added to a Histogram bucket. + message Exemplar { + // Value of the exemplar point. It determines which bucket the exemplar belongs to. + // If bucket_options define bounds for this bucket then this value must be within + // the defined bounds. + double value = 1; + + // time_unix_nano is the moment when this exemplar was recorded. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + fixed64 time_unix_nano = 2; + + // exemplar_attachments are contextual information about the example value. + // Keys in this list must be unique. + repeated opentelemetry.proto.common.v1.StringKeyValue attachments = 3; } - } - BucketBounds bucket_bounds = 6; - message Percentile { - // The percentile of a distribution. Must be in the interval - // [0.0, 100.0]. - double percentile = 1; - - // The value at the given percentile of a distribution. - double value = 2; + // exemplar is an optional representative value of the bucket. + Exemplar exemplar = 2; } - repeated Percentile percentiles = 7; -} - -// ExplicitBounds define arbitrarily defined bucket bounds. -// -// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket at -// index i are: -// -// (-infinity, bounds[i]) for i == 0 -// [bounds[i-1], bounds[i]) for 0 < i < N-1 -// [bounds[i], +infinity) for i == N-1 -message ExplicitBounds { - // The values in bounds array must be monotonically increasing. - repeated double bounds = 3; -} -// LinearBounds define evenly spaced bucket bounds. -// -// This defines number + 2 (= N) buckets. The boundaries for buckets at -// index i are: -// -// (-infinity, minimum) for i == 0 -// [minimum + ((i-1)*width), minimum + (i*width)) for 0 < i < N-1 -// [minimum + (number*width), +infinity) for i == N-1 -message LinearBounds { - uint64 number = 1; - double width = 2; - double minimum = 3; + // buckets is an optional field contains the values of histogram for each bucket. + // + // The sum of the values in the buckets "count" field must equal the value in the count field. + // + // The number of elements in buckets array must be by one greater than the + // number of elements in bucket_bounds array. + // + // Note: if HistogramDataPoint.bucket_options defines bucket bounds then this field + // must also be present and number of elements in this field must be equal to the + // number of buckets defined by bucket_options. + repeated Bucket buckets = 5; + + // A histogram may optionally contain the distribution of the values in the population. + // In that case one of the option fields below and "buckets" field both must be defined. + // Otherwise all option fields and "buckets" field must be omitted in which case the + // distribution of values in the histogram is unknown and only the total count and sum are known. + + // explicit_bounds is the only supported bucket option currently. + // TODO: Add more bucket options. + + // explicit_bounds specifies buckets with explicitly defined bounds for values. + // The bucket boundaries are described by "bounds" field. + // + // This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket + // at index i are: + // + // [0, bounds[i]) for i == 0 + // [bounds[i-1], bounds[i]) for 0 < i < N-1 + // [bounds[i], +infinity) for i == N-1 + // The values in bounds array must be strictly increasing and > 0. + // + // Note: only [a, b) intervals are currently supported for each bucket. If we decides + // to also support (a, b] intervals we should add support for these by defining a boolean + // value which decides what type of intervals to use. + repeated double explicit_bounds = 6; } From acfaa4dd930c21f0fe3b12acd422f69320d0327d Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 16:53:43 -0700 Subject: [PATCH 08/14] Update metric data values Remove oneof and add Type field to the MetricDescriptor to specify what values to expect in the metric.data. --- gen/go/metrics/v1/metrics.pb.go | 257 ++++++++++--------- opentelemetry/proto/metrics/v1/metrics.proto | 55 +++- 2 files changed, 185 insertions(+), 127 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index ca1f536da..760314c08 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,6 +22,54 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// Type is the type of values this metric has. +type MetricDescriptor_Type int32 + +const ( + // UNDEFINED is the default Type, it MUST not be used. + MetricDescriptor_UNDEFINED MetricDescriptor_Type = 0 + // INT64 values are represents as signed 64-bit integers. + // + // A Metric of this Type MUST assign values to the int64_value field in + // its Data. + MetricDescriptor_INT64 MetricDescriptor_Type = 1 + // DOUBLE values are represents as double-precision floating-point + // numbers. + // + // A Metric of this Type MUST assign values to the double_value field + // in its Data. + MetricDescriptor_DOUBLE MetricDescriptor_Type = 2 + // DISTRIBUTION values are statistics for an observed population + // represented. These statistics are represented as a Distribution + // message. + // + // A Metric of this Type MUST assign values to the distribution_value + // field in its Data. + MetricDescriptor_DISTRIBUTION MetricDescriptor_Type = 3 +) + +var MetricDescriptor_Type_name = map[int32]string{ + 0: "UNDEFINED", + 1: "INT64", + 2: "DOUBLE", + 3: "DISTRIBUTION", +} + +var MetricDescriptor_Type_value = map[string]int32{ + "UNDEFINED": 0, + "INT64": 1, + "DOUBLE": 2, + "DISTRIBUTION": 3, +} + +func (x MetricDescriptor_Type) String() string { + return proto.EnumName(MetricDescriptor_Type_name, int32(x)) +} + +func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 0} +} + // Temporality describes how metric values are reported over time. type MetricDescriptor_Temporality int32 @@ -76,7 +124,7 @@ func (x MetricDescriptor_Temporality) String() string { } func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{3, 0} + return fileDescriptor_3c3112f9fa006917, []int{3, 1} } // Domain describes the set of numbers metric values belong to if any. @@ -109,7 +157,7 @@ func (x MetricDescriptor_Domain) String() string { } func (MetricDescriptor_Domain) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{3, 1} + return fileDescriptor_3c3112f9fa006917, []int{3, 2} } // A collection of InstrumentationLibraryMetrics from a Resource. @@ -333,16 +381,16 @@ type Metric_Data struct { // 00:00:00 UTC on 1 January 1970). If zero, it is treated as unspecified // and may be set by the receiver. TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // Value is the measured value. - // - // Types that are valid to be assigned to Value: - // *Metric_Data_Int64Value - // *Metric_Data_DoubleValue - // *Metric_Data_DistributionValue - Value isMetric_Data_Value `protobuf_oneof:"Value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // int64_value contains the measured value for INT64 type Metrics. + Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` + // double_value contains the measured value for DOUBLE type Metrics. + DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` + // distribution_value contains the measured value for DISTRIBUTION type + // Metrics. + DistributionValue *Distribution `protobuf:"bytes,6,opt,name=distribution_value,json=distributionValue,proto3" json:"distribution_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Metric_Data) Reset() { *m = Metric_Data{} } @@ -391,65 +439,27 @@ func (m *Metric_Data) GetTimeUnixNano() uint64 { return 0 } -type isMetric_Data_Value interface { - isMetric_Data_Value() -} - -type Metric_Data_Int64Value struct { - Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3,oneof"` -} - -type Metric_Data_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type Metric_Data_DistributionValue struct { - DistributionValue *Distribution `protobuf:"bytes,6,opt,name=distribution_value,json=distributionValue,proto3,oneof"` -} - -func (*Metric_Data_Int64Value) isMetric_Data_Value() {} - -func (*Metric_Data_DoubleValue) isMetric_Data_Value() {} - -func (*Metric_Data_DistributionValue) isMetric_Data_Value() {} - -func (m *Metric_Data) GetValue() isMetric_Data_Value { - if m != nil { - return m.Value - } - return nil -} - func (m *Metric_Data) GetInt64Value() int64 { - if x, ok := m.GetValue().(*Metric_Data_Int64Value); ok { - return x.Int64Value + if m != nil { + return m.Int64Value } return 0 } func (m *Metric_Data) GetDoubleValue() float64 { - if x, ok := m.GetValue().(*Metric_Data_DoubleValue); ok { - return x.DoubleValue + if m != nil { + return m.DoubleValue } return 0 } func (m *Metric_Data) GetDistributionValue() *Distribution { - if x, ok := m.GetValue().(*Metric_Data_DistributionValue); ok { - return x.DistributionValue + if m != nil { + return m.DistributionValue } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Metric_Data) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Metric_Data_Int64Value)(nil), - (*Metric_Data_DoubleValue)(nil), - (*Metric_Data_DistributionValue)(nil), - } -} - // Defines a metric type and its schema. type MetricDescriptor struct { // name of the metric, including its DNS name prefix. It must be unique. @@ -459,14 +469,15 @@ type MetricDescriptor struct { // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - Temporality MetricDescriptor_Temporality `protobuf:"varint,4,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` + Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` + Temporality MetricDescriptor_Temporality `protobuf:"varint,5,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` // monotonic is true if the metric values are entirely non-increasing, or // entirely non-decreasing. - Monotonic bool `protobuf:"varint,5,opt,name=monotonic,proto3" json:"monotonic,omitempty"` - Domain MetricDescriptor_Domain `protobuf:"varint,6,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` + Monotonic bool `protobuf:"varint,6,opt,name=monotonic,proto3" json:"monotonic,omitempty"` + Domain MetricDescriptor_Domain `protobuf:"varint,7,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. - Labels []*v11.StringKeyValue `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty"` + Labels []*v11.StringKeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -518,6 +529,13 @@ func (m *MetricDescriptor) GetUnit() string { return "" } +func (m *MetricDescriptor) GetType() MetricDescriptor_Type { + if m != nil { + return m.Type + } + return MetricDescriptor_UNDEFINED +} + func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { if m != nil { return m.Temporality @@ -772,6 +790,7 @@ func (m *Distribution_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { } func init() { + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value) proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality", MetricDescriptor_Temporality_name, MetricDescriptor_Temporality_value) proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Domain", MetricDescriptor_Domain_name, MetricDescriptor_Domain_value) proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") @@ -789,61 +808,65 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 895 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0x23, 0x35, - 0x14, 0xae, 0x33, 0xf9, 0x3d, 0x53, 0xd2, 0xd4, 0x5a, 0x41, 0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, 0x1e, 0xd6, 0x8b, 0x4d, 0xab, 0x8d, 0x48, 0x35, 0x85, 0xbb, 0x1a, 0x6d, 0xfc, 0x96, 0x83, - 0xa2, 0x29, 0xbe, 0xe5, 0x78, 0x3f, 0x42, 0x99, 0xad, 0x98, 0xbf, 0x5c, 0xd0, 0x40, 0x9f, 0xd1, - 0xde, 0x3c, 0x9c, 0x6b, 0x3a, 0x73, 0xdc, 0x44, 0x83, 0x5c, 0xaa, 0x35, 0x7e, 0x47, 0x50, 0x4e, - 0xe1, 0x78, 0x73, 0xf3, 0x03, 0x46, 0xda, 0x17, 0xb3, 0x58, 0xf3, 0x45, 0xc9, 0xad, 0xf9, 0xa2, - 0x0c, 0xc0, 0xa6, 0x4a, 0xd1, 0xd9, 0xab, 0xf8, 0xfb, 0x1f, 0xd6, 0xad, 0xff, 0x33, 0x78, 0x59, - 0x85, 0xae, 0x82, 0x47, 0x5c, 0x6e, 0x38, 0x65, 0x77, 0x3b, 0xf9, 0x53, 0x3b, 0x8d, 0x13, 0xa7, - 0xe8, 0xa7, 0x67, 0x67, 0x5c, 0xbd, 0x8a, 0xa6, 0xf1, 0x16, 0x9d, 0xb8, 0x74, 0xef, 0xea, 0x71, - 0x70, 0x4d, 0x69, 0xcf, 0x3c, 0x15, 0xce, 0x98, 0xe8, 0x9c, 0x65, 0xdf, 0x2a, 0xd3, 0xa2, 0x4e, - 0x3c, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x50, 0xe1, 0xd3, 0x01, 0xd4, 0x08, 0x00, 0x00, + // 953 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe3, 0x44, + 0x10, 0x3e, 0xc7, 0xa9, 0x9b, 0x8c, 0x7b, 0xa9, 0xbb, 0x3a, 0x81, 0x15, 0x71, 0x5c, 0x2e, 0x42, + 0x10, 0xe0, 0xea, 0xd0, 0x5e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xea, 0x50, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 3cfd72c75..7a9a6dca2 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -124,12 +124,19 @@ message Metric { // and may be set by the receiver. fixed64 time_unix_nano = 3; - // Value is the measured value. - oneof Value { - int64 int64_value = 4; - double double_value = 5; - Distribution distribution_value = 6; - } + // The following three fields are mutually exclusive and represent the + // measured value. Only one of the following three fields can be + // populated. The populated field MUST match the MetricDescriptor type. + + // int64_value contains the measured value for INT64 type Metrics. + int64 int64_value = 4; + + // double_value contains the measured value for DOUBLE type Metrics. + double double_value = 5; + + // distribution_value contains the measured value for DISTRIBUTION type + // Metrics. + Distribution distribution_value = 6; } } @@ -145,6 +152,34 @@ message MetricDescriptor { // described by http://unitsofmeasure.org/ucum.html. string unit = 3; + // Type is the type of values this metric has. + enum Type { + // UNDEFINED is the default Type, it MUST not be used. + UNDEFINED = 0; + + // INT64 values are represents as signed 64-bit integers. + // + // A Metric of this Type MUST assign values to the int64_value field in + // its Data. + INT64 = 1; + + // DOUBLE values are represents as double-precision floating-point + // numbers. + // + // A Metric of this Type MUST assign values to the double_value field + // in its Data. + DOUBLE = 2; + + // DISTRIBUTION values are statistics for an observed population + // represented. These statistics are represented as a Distribution + // message. + // + // A Metric of this Type MUST assign values to the distribution_value + // field in its Data. + DISTRIBUTION = 3; + } + Type type = 4; + // Temporality describes how metric values are reported over time. enum Temporality { // UNSPECIFIED is the default Temporality, it MUST not be used. @@ -180,11 +215,11 @@ message MetricDescriptor { // CUMULATIVE metrics are not guaranteed to be monotonic. CUMULATIVE = 3; } - Temporality temporality = 4; + Temporality temporality = 5; // monotonic is true if the metric values are entirely non-increasing, or // entirely non-decreasing. - bool monotonic = 5; + bool monotonic = 6; // Domain describes the set of numbers metric values belong to if any. enum Domain { @@ -198,11 +233,11 @@ message MetricDescriptor { // NONPOSITIVE is the set of numbers less than or equal to zero. NONPOSITIVE = 2; } - Domain domain = 6; + Domain domain = 7; // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 7; + repeated opentelemetry.proto.common.v1.StringKeyValue labels = 8; } // Distribution is a data point in a timeseries containing statistics for From 33fef5849479ca8b1d8e0a574ac9105843ddb2fd Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Fri, 17 Apr 2020 17:36:24 -0700 Subject: [PATCH 09/14] Break monotonic up --- gen/go/metrics/v1/metrics.pb.go | 174 +++++++++++-------- opentelemetry/proto/metrics/v1/metrics.proto | 19 +- 2 files changed, 122 insertions(+), 71 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 760314c08..dbe722ea1 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -127,6 +127,42 @@ func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 1} } +// Monotonic describes the metric values to be entirely non-increasing, +// or entirely non-decreasing. +type MetricDescriptor_Monotonic int32 + +const ( + // UNKNOWN is the default, and means it the monotonic nature of the + // metric values is known. + MetricDescriptor_UNKNOWN MetricDescriptor_Monotonic = 0 + // NONINCREASING means all the successive metric values decrease or + // remain constant. + MetricDescriptor_NONINCREASING MetricDescriptor_Monotonic = 1 + // NONDECREASING means all the successive metric values increase or + // remain constant. + MetricDescriptor_NONDECREASING MetricDescriptor_Monotonic = 2 +) + +var MetricDescriptor_Monotonic_name = map[int32]string{ + 0: "UNKNOWN", + 1: "NONINCREASING", + 2: "NONDECREASING", +} + +var MetricDescriptor_Monotonic_value = map[string]int32{ + "UNKNOWN": 0, + "NONINCREASING": 1, + "NONDECREASING": 2, +} + +func (x MetricDescriptor_Monotonic) String() string { + return proto.EnumName(MetricDescriptor_Monotonic_name, int32(x)) +} + +func (MetricDescriptor_Monotonic) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 2} +} + // Domain describes the set of numbers metric values belong to if any. type MetricDescriptor_Domain int32 @@ -157,7 +193,7 @@ func (x MetricDescriptor_Domain) String() string { } func (MetricDescriptor_Domain) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{3, 2} + return fileDescriptor_3c3112f9fa006917, []int{3, 3} } // A collection of InstrumentationLibraryMetrics from a Resource. @@ -471,10 +507,8 @@ type MetricDescriptor struct { Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` Temporality MetricDescriptor_Temporality `protobuf:"varint,5,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` - // monotonic is true if the metric values are entirely non-increasing, or - // entirely non-decreasing. - Monotonic bool `protobuf:"varint,6,opt,name=monotonic,proto3" json:"monotonic,omitempty"` - Domain MetricDescriptor_Domain `protobuf:"varint,7,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` + Monotonic MetricDescriptor_Monotonic `protobuf:"varint,6,opt,name=monotonic,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Monotonic" json:"monotonic,omitempty"` + Domain MetricDescriptor_Domain `protobuf:"varint,7,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. Labels []*v11.StringKeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` @@ -543,11 +577,11 @@ func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { return MetricDescriptor_UNSPECIFIED } -func (m *MetricDescriptor) GetMonotonic() bool { +func (m *MetricDescriptor) GetMonotonic() MetricDescriptor_Monotonic { if m != nil { return m.Monotonic } - return false + return MetricDescriptor_UNKNOWN } func (m *MetricDescriptor) GetDomain() MetricDescriptor_Domain { @@ -792,6 +826,7 @@ func (m *Distribution_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { func init() { proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value) proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality", MetricDescriptor_Temporality_name, MetricDescriptor_Temporality_value) + proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Monotonic", MetricDescriptor_Monotonic_name, MetricDescriptor_Monotonic_value) proto.RegisterEnum("opentelemetry.proto.metrics.v1.MetricDescriptor_Domain", MetricDescriptor_Domain_name, MetricDescriptor_Domain_value) proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") proto.RegisterType((*InstrumentationLibraryMetrics)(nil), "opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics") @@ -808,65 +843,68 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 953 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x51, 0x6f, 0xe3, 0x44, - 0x10, 0x3e, 0xc7, 0xa9, 0x9b, 0x8c, 0x7b, 0xa9, 0xbb, 0x3a, 0x81, 0x15, 0x71, 0x5c, 0x2e, 0x42, - 0x10, 0xe0, 0xea, 0xd0, 0x5e, 0x39, 0x5e, 0x80, 0xa3, 0xb9, 0xf8, 0x90, 0x45, 0xea, 0x54, 0x9b, - 0xe4, 0x84, 0x40, 0x10, 0x39, 0xc9, 0xaa, 0xb7, 0x22, 0xde, 0x8d, 0xec, 0x75, 0x95, 0x3c, 0xf2, - 0xc0, 0x1f, 0xe0, 0x85, 0x5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 0x47, 0xb0, - 0x4b, 0x96, 0x8b, 0x39, 0x9d, 0x52, 0x31, 0x9e, 0xf0, 0x84, 0xcd, 0x62, 0xdb, 0x68, 0xe8, 0x2d, - 0x0d, 0xd7, 0x72, 0xb8, 0x23, 0xd1, 0xfa, 0xef, 0x25, 0x30, 0x54, 0xf2, 0x0d, 0xe3, 0x7d, 0x0f, - 0x15, 0xb2, 0x24, 0xe1, 0x62, 0x1e, 0x44, 0x72, 0x46, 0x73, 0xf3, 0x72, 0xaf, 0xe9, 0xcc, 0x71, - 0x33, 0x0e, 0x7c, 0xc1, 0x56, 0xff, 0x43, 0x83, 0x4a, 0x0e, 0xa7, 0xc5, 0xd5, 0x07, 0x44, 0x93, - 0xba, 0xa8, 0xc3, 0x9a, 0xaf, 0x59, 0x69, 0xcd, 0xd7, 0xac, 0x0f, 0x66, 0x20, 0x44, 0x30, 0x7d, - 0x9d, 0xfe, 0x7b, 0x62, 0x5b, 0xff, 0x3f, 0x8b, 0x5b, 0x64, 0xe8, 0x08, 0x78, 0x4c, 0xf9, 0x86, - 0x29, 0x3b, 0x3b, 0xd9, 0x0f, 0xf5, 0x34, 0x75, 0x9c, 0x6a, 0x3f, 0x3c, 0x3f, 0xa3, 0xe2, 0x75, - 0x32, 0x49, 0x4b, 0xb4, 0xd3, 0xd4, 0xfd, 0xcb, 0x8b, 0xc9, 0x15, 0xa6, 0x7d, 0x75, 0x4d, 0x39, - 0x23, 0xac, 0x7d, 0x56, 0xbc, 0x27, 0x4d, 0x0c, 0xe9, 0x78, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x4c, 0x34, 0xbd, 0xea, 0x50, 0x09, 0x00, 0x00, + // 997 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xd1, 0x6e, 0xdb, 0x36, + 0x14, 0x86, 0x4b, 0xdb, 0x71, 0xe2, 0xa3, 0xd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, 0x3f, 0x4f, 0x68, 0x2b, 0x78, 0xc4, 0xe5, 0x8a, 0x53, 0xb6, 0x37, 0xd3, + 0x8f, 0xf9, 0x49, 0xb2, 0x70, 0x82, 0xbe, 0x7f, 0x7e, 0xca, 0xd5, 0xdb, 0x78, 0x94, 0x6c, 0xd1, + 0x4a, 0x52, 0x77, 0x2e, 0x7e, 0x8a, 0x2e, 0x91, 0x76, 0xcc, 0x2f, 0xd2, 0x29, 0x13, 0xad, 0xd3, + 0xfc, 0x3f, 0xda, 0xa8, 0xac, 0x17, 0x9e, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x18, 0x31, + 0x50, 0xcc, 0x09, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 7a9a6dca2..5467298ea 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -217,9 +217,22 @@ message MetricDescriptor { } Temporality temporality = 5; - // monotonic is true if the metric values are entirely non-increasing, or - // entirely non-decreasing. - bool monotonic = 6; + // Monotonic describes the metric values to be entirely non-increasing, + // or entirely non-decreasing. + enum Monotonic { + // UNKNOWN is the default, and means it the monotonic nature of the + // metric values is known. + UNKNOWN = 0; + + // NONINCREASING means all the successive metric values decrease or + // remain constant. + NONINCREASING = 1; + + // NONDECREASING means all the successive metric values increase or + // remain constant. + NONDECREASING = 2; + } + Monotonic monotonic = 6; // Domain describes the set of numbers metric values belong to if any. enum Domain { From 9727d7d0e90527dbbaf3fd66e4eee509f21cc00b Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Apr 2020 09:25:16 -0700 Subject: [PATCH 10/14] Update docs for data labels Treat overlap as an error. --- opentelemetry/proto/metrics/v1/metrics.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 5467298ea..93ce68797 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -94,10 +94,11 @@ message Metric { repeated Data data = 2; message Data { - // The set of labels that uniquely identify this timeseries. + // The set of additional labels uniquely identifying this metric data. // - // These labels take precedence over any labels with the same key defined - // in the metric descriptor. + // It is considered an error for Labels used here to have the same key + // as those defined in this Metric's MetricDescriptor and MUST be + // avoided. The handling of this error is left up to the receiver. repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; // start_time_unix_nano is the beginning of a time interval over which From 116fad2bb1a2cba1360a9a2e785bc95ab9334af7 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Apr 2020 09:26:23 -0700 Subject: [PATCH 11/14] Update docs --- opentelemetry/proto/metrics/v1/metrics.proto | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 93ce68797..a69737b31 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -88,9 +88,10 @@ message InstrumentationLibraryMetrics { // //----------------------------------------------------------------------- message Metric { - // metric_descriptor describes the Metric. + // metric_descriptor describing this Metric. MetricDescriptor metric_descriptor = 1; + // Data values of this Metric. repeated Data data = 2; message Data { @@ -141,12 +142,15 @@ message Metric { } } -// Defines a metric type and its schema. +// MetricDescriptor describes the identifying attributes of a metric. message MetricDescriptor { - // name of the metric, including its DNS name prefix. It must be unique. + // name of the metric. string name = 1; - // description of the metric, which can be used in documentation. + // description of the metric. + // + // This description is commonly used in documentation so it should be a + // human-readable explanation of the metric. string description = 2; // unit in which the metric value is reported. Follows the format From 275d831f4816835ed63f5581ac6f7ca7c8154af2 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Apr 2020 12:49:03 -0700 Subject: [PATCH 12/14] Update handling of time intervals --- gen/go/metrics/v1/metrics.pb.go | 225 ++++++++++--------- opentelemetry/proto/metrics/v1/metrics.proto | 85 ++++--- 2 files changed, 182 insertions(+), 128 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index dbe722ea1..a8f3d8c9d 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -342,12 +342,25 @@ func (m *InstrumentationLibraryMetrics) GetMetrics() []*Metric { // //----------------------------------------------------------------------- type Metric struct { - // metric_descriptor describes the Metric. - MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` - Data []*Metric_Data `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // metric_descriptor describing this Metric. + MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"` + // start_time_unix_nano is the beginning of the time interval over which + // all data for this Metric were recorded. It MUST be represented as the + // UNIX Epoch time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 + // January 1970). If zero, it is treated as unspecified. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // end_time_unix_nano is the end of the time interval over which all data + // for this Metric were recorded. It MUST be represented as the UNIX Epoch + // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). + // If zero, it is treated as unspecified and the end to the time interval + // is define by the receiver as the time this data is received. It is + // RECOMMENDED to not leave this unspecified. + EndTimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` + // Data values of this Metric. + Data []*Metric_Data `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Metric) Reset() { *m = Metric{} } @@ -382,6 +395,20 @@ func (m *Metric) GetMetricDescriptor() *MetricDescriptor { return nil } +func (m *Metric) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *Metric) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 +} + func (m *Metric) GetData() []*Metric_Data { if m != nil { return m.Data @@ -390,33 +417,22 @@ func (m *Metric) GetData() []*Metric_Data { } type Metric_Data struct { - // The set of labels that uniquely identify this timeseries. + // The set of additional labels uniquely identifying this data. // - // These labels take precedence over any labels with the same key defined - // in the metric descriptor. + // It is considered an error for Labels used here to have the same key + // as those defined in this Metric's MetricDescriptor and MUST be + // avoided. The handling of this error is left up to the receiver. Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` - // start_time_unix_nano is the beginning of a time interval over which - // this data point was recorded. It MUST be represented as the UNIX Epoch - // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). - // If zero, it is treated as unspecified and may be set by the receiver. - // - // If this data point is a part of a timeseries for an INSTANTANEOUS - // metric, this value is ignored. - // - // If this data point is a part of a timeseries for a DELTA, or - // CUMULATIVE metric, this value represents the instant before the - // measuring time interval began (i.e. for time t to be in the measuring - // interval than start_time_unix_nano < t <= time_unix_nano). - // - // This time MUST be reset so as to represent a new measurement lifetime - // if this data point is part of a timeseries for a CUMULATIVE metric and - // the metric value is reset to zero. + // start_time_unix_nano is the beginning of the time interval over which + // this data was recorded. It MUST be represented as the UNIX Epoch time + // in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). If + // zero, it is treated as unspecified. StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // time_unix_nano is the time when this data point was recorded. It MUST - // be represented as the UNIX Epoch time in nanoseconds (nanoseconds since - // 00:00:00 UTC on 1 January 1970). If zero, it is treated as unspecified - // and may be set by the receiver. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + // end_time_unix_nano is the end of the time interval over which this + // data was recorded. It MUST be represented as the UNIX Epoch time in + // nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). If + // zero, it is treated as unspecified. + EndTimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` // int64_value contains the measured value for INT64 type Metrics. Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` // double_value contains the measured value for DOUBLE type Metrics. @@ -468,9 +484,9 @@ func (m *Metric_Data) GetStartTimeUnixNano() uint64 { return 0 } -func (m *Metric_Data) GetTimeUnixNano() uint64 { +func (m *Metric_Data) GetEndTimeUnixNano() uint64 { if m != nil { - return m.TimeUnixNano + return m.EndTimeUnixNano } return 0 } @@ -496,11 +512,14 @@ func (m *Metric_Data) GetDistributionValue() *Distribution { return nil } -// Defines a metric type and its schema. +// MetricDescriptor describes the identifying attributes of a metric. type MetricDescriptor struct { - // name of the metric, including its DNS name prefix. It must be unique. + // name of the metric. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // description of the metric, which can be used in documentation. + // description of the metric. + // + // This description is commonly used in documentation so it should be a + // human-readable explanation of the metric. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. @@ -766,9 +785,9 @@ type Distribution_Bucket_Exemplar struct { // If bucket_options define bounds for this bucket then this value must be within // the defined bounds. Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - // time_unix_nano is the moment when this exemplar was recorded. + // end_time_unix_nano is the moment when this exemplar was recorded. // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` + EndTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` // exemplar_attachments are contextual information about the example value. // Keys in this list must be unique. Attachments []*v11.StringKeyValue `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty"` @@ -809,9 +828,9 @@ func (m *Distribution_Bucket_Exemplar) GetValue() float64 { return 0 } -func (m *Distribution_Bucket_Exemplar) GetTimeUnixNano() uint64 { +func (m *Distribution_Bucket_Exemplar) GetEndTimeUnixNano() uint64 { if m != nil { - return m.TimeUnixNano + return m.EndTimeUnixNano } return 0 } @@ -843,68 +862,68 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 997 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xd1, 0x6e, 0xdb, 0x36, - 0x14, 0x86, 0x4b, 0xdb, 0x71, 0xe2, 0xa3, 0xd4, 0x55, 0x88, 0x62, 0x33, 0x02, 0x74, 0x75, 0x8d, - 0x61, 0xf3, 0xb6, 0x46, 0x5e, 0xd2, 0xac, 0x03, 0x86, 0xad, 0x5d, 0x1c, 0xab, 0x85, 0xd0, 0x84, - 0x0e, 0x68, 0xbb, 0x2b, 0x36, 0x6c, 0x86, 0x6c, 0x13, 0x29, 0x31, 0x8b, 0x34, 0x24, 0x2a, 0x88, - 0x1f, 0x60, 0x2f, 0xb0, 0x9b, 0x3d, 0xd1, 0x1e, 0x60, 0x6f, 0xb0, 0x47, 0xd8, 0xdd, 0xae, 0x06, - 0x0c, 0x22, 0x25, 0x47, 0x09,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- 0x50, 0xcc, 0x09, 0x00, 0x00, + // 1003 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xdd, 0x6e, 0xdb, 0x36, + 0x14, 0xc7, 0x2b, 0x5b, 0x71, 0xe2, 0xa3, 0x34, 0x51, 0x88, 0x62, 0x13, 0x02, 0x74, 0x75, 0x7d, + 0xb1, 0x79, 0x6b, 0x23, 0x2f, 0x69, 0xd6, 0x01, 0xc3, 0xd6, 0x2e, 0x8e, 0xd5, 0x42, 0x68, 0x42, + 0x05, 0xb4, 0xdd, 0x15, 0x1b, 0x36, 0x43, 0xb6, 0x89, 0x94, 0x98, 0x45, 0x1a, 0x12, 0x15, 0xc4, + 0x0f, 0xb0, 0x87, 0xd8, 0xcd, 0x9e, 0x68, 0x37, 0xbb, 0xd8, 0xfd, 0x5e, 0x64, 0xc3, 0x20, 0x52, + 0x72, 0x9c, 0xc0, 0x89, 0x9b, 0x0d, 0xbd, 0x23, 0xcf, 0xc7, 0x8f, 0x87, 0x7f, 0x1d, 0x52, 0x84, + 0xc7, 0x62, 0x42, 0xb9, 0xa4, 0x63, 0x1a, 0x51, 0x19, 0x4f, 0x9b, 0x93, 0x58, 0x48, 0xd1, 0xcc, + 0xc6, 0x6c, 0x98, 0x34, 0xcf, 0x76, 0x8b, 0xa1, 0xab, 0x1c, 0xe8, 0xa3, 0x4b, 0xd1, 0xda, 0xe8, + 0x16, 0x21, 0x67, 0xbb, 0xdb, 0x9f, 0x2d, 0xa2, 0x0d, 0x45, 0x14, 0x09, 0x9e, 0xc1, 0xf4, 0x48, + 0xa7, 0x6d, 0xbb, 0x8b, 0x62, 0x63, 0x9a, 0x88, 0x34, 0x1e, 0xd2, 0x2c, 0xba, 0x18, 0xeb, 0xf8, + 0xfa, 0x5f, 0x06, 0x6c, 0x92, 0xdc, 0x74, 0xac, 0x97, 0x44, 0x1e, 0xac, 0x15, 0x51, 0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 0x06, 0xac, 0x15, 0xe6, 0x6c, 0x71, 0x7d, + 0x79, 0x19, 0x4a, 0x17, 0x3d, 0xb9, 0xe6, 0x42, 0x2d, 0x2d, 0xbe, 0x50, 0x03, 0xb0, 0x42, 0x29, + 0xc3, 0xe1, 0xdb, 0xec, 0x1f, 0x9b, 0x38, 0xe5, 0xff, 0xd2, 0xff, 0xf3, 0x84, 0x96, 0x84, 0x87, + 0x4c, 0x2c, 0xd9, 0x6c, 0x6b, 0x3d, 0x7f, 0x38, 0x9c, 0x64, 0x8e, 0x13, 0xe3, 0xfb, 0xe7, 0xa7, + 0x4c, 0xbe, 0x4d, 0x07, 0xd9, 0x12, 0xcd, 0x2c, 0x75, 0xe7, 0xe2, 0x01, 0x76, 0x89, 0xb4, 0xa3, + 0x9f, 0x63, 0xa7, 0x94, 0x37, 0x4f, 0xe7, 0xdf, 0x83, 0x83, 0x8a, 0x72, 0x3c, 0xf9, 0x37, 0x00, + 0x00, 0xff, 0xff, 0x99, 0x8d, 0x14, 0x68, 0x38, 0x0a, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index a69737b31..68fd2b22e 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -91,40 +91,75 @@ message Metric { // metric_descriptor describing this Metric. MetricDescriptor metric_descriptor = 1; + // The following timestamps define the time interval over which all data + // for this Metric were recorded. How each timestamp is interpreted and + // its validity depend on the Temporality of this Metric. + // + // For an INSTANTANEOUS Metric, start_time_unix_nano is optional, but if + // specified, it MUST equal end_time_unix_nano. The end_time_unix_nano + // timestamp is the moment the data was recorded. + // + // For both a DELTA and CUMULATIVE Metric, start_time_unix_nano and + // end_time_unix_nano specify a non-zero positive time interval: + // + // start_time_unix_nano <= t < end_time_unix_nano + // + // All the data for a DELTA and CUMULATIVE Metric are interpreted as being + // recorded over this time interval unless an additional valid time + // interval is defined for individual data. In that case, only that + // individual data is interpreted as being recorded over that different + // interval. + // + // Time intervals for successive DELTA Metrics MUST be non-overlapping. + // Each interval needs to define the unique time over which the Metric is + // reported. + // + // For successive CUMULATIVE Metrics, the start_time_unix_nano MUST remain + // the same until the cumulative value is reset. The end_time_unix_nano is + // increased successively to expand the overlapping interval the Metric + // series is defined. + // + // If any data specifies either timestamp itself, that time is interpreted + // as overriding the times specified here. If all data for this Metric are + // reported over the same time interval, data SHOULD NOT specify + // overrides. Rather, the time interval SHOULD be uniformly defined here. + + // start_time_unix_nano is the beginning of the time interval over which + // all data for this Metric were recorded. It MUST be represented as the + // UNIX Epoch time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 + // January 1970). If zero, it is treated as unspecified. + fixed64 start_time_unix_nano = 2; + + // end_time_unix_nano is the end of the time interval over which all data + // for this Metric were recorded. It MUST be represented as the UNIX Epoch + // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). + // If zero, it is treated as unspecified and the end to the time interval + // is define by the receiver as the time this data is received. It is + // RECOMMENDED to not leave this unspecified. + fixed64 end_time_unix_nano = 3; + // Data values of this Metric. - repeated Data data = 2; + repeated Data data = 4; message Data { - // The set of additional labels uniquely identifying this metric data. + // The set of additional labels uniquely identifying this data. // // It is considered an error for Labels used here to have the same key // as those defined in this Metric's MetricDescriptor and MUST be // avoided. The handling of this error is left up to the receiver. repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - // start_time_unix_nano is the beginning of a time interval over which - // this data point was recorded. It MUST be represented as the UNIX Epoch - // time in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). - // If zero, it is treated as unspecified and may be set by the receiver. - // - // If this data point is a part of a timeseries for an INSTANTANEOUS - // metric, this value is ignored. - // - // If this data point is a part of a timeseries for a DELTA, or - // CUMULATIVE metric, this value represents the instant before the - // measuring time interval began (i.e. for time t to be in the measuring - // interval than start_time_unix_nano < t <= time_unix_nano). - // - // This time MUST be reset so as to represent a new measurement lifetime - // if this data point is part of a timeseries for a CUMULATIVE metric and - // the metric value is reset to zero. + // start_time_unix_nano is the beginning of the time interval over which + // this data was recorded. It MUST be represented as the UNIX Epoch time + // in nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). If + // zero, it is treated as unspecified. fixed64 start_time_unix_nano = 2; - // time_unix_nano is the time when this data point was recorded. It MUST - // be represented as the UNIX Epoch time in nanoseconds (nanoseconds since - // 00:00:00 UTC on 1 January 1970). If zero, it is treated as unspecified - // and may be set by the receiver. - fixed64 time_unix_nano = 3; + // end_time_unix_nano is the end of the time interval over which this + // data was recorded. It MUST be represented as the UNIX Epoch time in + // nanoseconds (nanoseconds since 00:00:00 UTC on 1 January 1970). If + // zero, it is treated as unspecified. + fixed64 end_time_unix_nano = 3; // The following three fields are mutually exclusive and represent the // measured value. Only one of the following three fields can be @@ -288,9 +323,9 @@ message Distribution { // the defined bounds. double value = 1; - // time_unix_nano is the moment when this exemplar was recorded. + // end_time_unix_nano is the moment when this exemplar was recorded. // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 2; + fixed64 end_time_unix_nano = 2; // exemplar_attachments are contextual information about the example value. // Keys in this list must be unique. From c97cf899358d61803a92dfb306f646134e44f660 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Apr 2020 15:52:47 -0700 Subject: [PATCH 13/14] Remove unlikely to be used monotonic and domain refinements --- gen/go/metrics/v1/metrics.pb.go | 142 +++++++++---------- opentelemetry/proto/metrics/v1/metrics.proto | 9 +- 2 files changed, 67 insertions(+), 84 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index a8f3d8c9d..7c72d7a16 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -135,24 +135,19 @@ const ( // UNKNOWN is the default, and means it the monotonic nature of the // metric values is known. MetricDescriptor_UNKNOWN MetricDescriptor_Monotonic = 0 - // NONINCREASING means all the successive metric values decrease or - // remain constant. - MetricDescriptor_NONINCREASING MetricDescriptor_Monotonic = 1 // NONDECREASING means all the successive metric values increase or // remain constant. - MetricDescriptor_NONDECREASING MetricDescriptor_Monotonic = 2 + MetricDescriptor_NONDECREASING MetricDescriptor_Monotonic = 1 ) var MetricDescriptor_Monotonic_name = map[int32]string{ 0: "UNKNOWN", - 1: "NONINCREASING", - 2: "NONDECREASING", + 1: "NONDECREASING", } var MetricDescriptor_Monotonic_value = map[string]int32{ "UNKNOWN": 0, - "NONINCREASING": 1, - "NONDECREASING": 2, + "NONDECREASING": 1, } func (x MetricDescriptor_Monotonic) String() string { @@ -172,20 +167,16 @@ const ( MetricDescriptor_NONE MetricDescriptor_Domain = 0 // NONNEGATIVE is the set of numbers greater than or equal to zero. MetricDescriptor_NONNEGATIVE MetricDescriptor_Domain = 1 - // NONPOSITIVE is the set of numbers less than or equal to zero. - MetricDescriptor_NONPOSITIVE MetricDescriptor_Domain = 2 ) var MetricDescriptor_Domain_name = map[int32]string{ 0: "NONE", 1: "NONNEGATIVE", - 2: "NONPOSITIVE", } var MetricDescriptor_Domain_value = map[string]int32{ "NONE": 0, "NONNEGATIVE": 1, - "NONPOSITIVE": 2, } func (x MetricDescriptor_Domain) String() string { @@ -862,68 +853,67 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1003 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xdd, 0x6e, 0xdb, 0x36, - 0x14, 0xc7, 0x2b, 0x5b, 0x71, 0xe2, 0xa3, 0x34, 0x51, 0x88, 0x62, 0x13, 0x02, 0x74, 0x75, 0x7d, - 0xb1, 0x79, 0x6b, 0x23, 0x2f, 0x69, 0xd6, 0x01, 0xc3, 0xd6, 0x2e, 0x8e, 0xd5, 0x42, 0x68, 0x42, - 0x05, 0xb4, 0xdd, 0x15, 0x1b, 0x36, 0x43, 0xb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0x75, 0xe7, 0xe2, 0x01, 0x76, 0x89, 0xb4, 0xa3, - 0x9f, 0x63, 0xa7, 0x94, 0x37, 0x4f, 0xe7, 0xdf, 0x83, 0x83, 0x8a, 0x72, 0x3c, 0xf9, 0x37, 0x00, - 0x00, 0xff, 0xff, 0x99, 0x8d, 0x14, 0x68, 0x38, 0x0a, 0x00, 0x00, + // 991 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0xc7, 0x3b, 0xf6, 0xc6, 0x89, 0xcf, 0xa6, 0xc9, 0x66, 0x54, 0xc1, 0x2a, 0x52, 0xa9, 0x6b, + 0x24, 0x30, 0xa4, 0x59, 0x93, 0xb4, 0x14, 0x09, 0x01, 0x25, 0x8e, 0xb7, 0xd5, 0xaa, 0xc9, 0x38, + 0x1a, 0xdb, 0xa5, 0x02, 0x81, 0xb5, 0xb6, 0x47, 0xe9, 0x08, 0xef, 0x8c, 0xb5, 0x3b, 0x1b, 0xc5, + 0x0f, 0xc0, 0x43, 0x70, 0xc3, 0x13, 0x71, 0xc3, 0x05, 0x17, 0xdc, 0xf1, 0x24, 0x08, 0xed, 0xcc, + 0x6e, 0xe2, 0x44, 0x4e, 0xd2, 0x80, 0x7a, 0x37, 0x73, 0x3e, 0x7e, 0x73, 0xce, 0xdf, 0x67, 0xc7, + 0x03, 0x8f, 0xe4, 0x94, 0x09, 0xc5, 0x26, 0x2c, 0x62, 0x2a, 0x9e, 0x35, 0xa7, 0xb1, 0x54, 0xb2, + 0x99, 0xad, 0xf9, 0x28, 0x69, 0x9e, 0xec, 0x14, 0x4b, 0x4f, 0x3b, 0xf0, 0x07, 0x17, 0xa2, 0x8d, + 0xd1, 0x2b, 0x42, 0x4e, 0x76, 0x36, 0x3f, 0x5d, 0x44, 0x1b, 0xc9, 0x28, 0x92, 0x22, 0x83, 0x99, + 0x95, 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, 0x65, 0xd1, 0x74, 0x12, 0xc6, 0xba, 0x47, 0xfb, + 0xe6, 0x8f, 0x66, 0x41, 0x65, 0x9e, 0x9f, 0x33, 0xe8, 0x19, 0x6d, 0xf3, 0x37, 0x04, 0x2b, 0x85, + 0x39, 0x3b, 0xdc, 0x5c, 0x4c, 0x48, 0xeb, 0x62, 0x36, 0x57, 0x5c, 0x96, 0xa5, 0xc5, 0x97, 0x65, + 0x07, 0xec, 0x50, 0xa9, 0x70, 0xf4, 0x26, 0xfb, 0xff, 0x4c, 0xdc, 0xf2, 0x7f, 0x99, 0xed, 0x79, + 0x42, 0x4b, 0xc1, 0x43, 0x2e, 0x6f, 0x68, 0xb6, 0xb5, 0x9a, 0x3f, 0x0a, 0x8e, 0x32, 0xc7, 0x11, + 0xfa, 0xfe, 0xd9, 0x31, 0x57, 0x6f, 0xd2, 0x61, 0x76, 0x44, 0x33, 0x4b, 0xdd, 0x3e, 0x7f, 0x5c, + 0x5d, 0x20, 0x6d, 0x9b, 0xa7, 0xd6, 0x31, 0x13, 0xcd, 0xe3, 0xf9, 0xb7, 0xde, 0xb0, 0xa2, 0x1d, + 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x48, 0x44, 0xc1, 0xbc, 0x14, 0x0a, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 68fd2b22e..676f11bc4 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -264,13 +264,9 @@ message MetricDescriptor { // metric values is known. UNKNOWN = 0; - // NONINCREASING means all the successive metric values decrease or - // remain constant. - NONINCREASING = 1; - // NONDECREASING means all the successive metric values increase or // remain constant. - NONDECREASING = 2; + NONDECREASING = 1; } Monotonic monotonic = 6; @@ -282,9 +278,6 @@ message MetricDescriptor { // NONNEGATIVE is the set of numbers greater than or equal to zero. NONNEGATIVE = 1; - - // NONPOSITIVE is the set of numbers less than or equal to zero. - NONPOSITIVE = 2; } Domain domain = 7; From 5d071f1793ad2bac84aa7169233d8e035083f76a Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 22 Apr 2020 17:10:00 -0700 Subject: [PATCH 14/14] Update MetricDescriptor comments --- gen/go/metrics/v1/metrics.pb.go | 290 +++++++++++-------- opentelemetry/proto/metrics/v1/metrics.proto | 125 +++++--- 2 files changed, 255 insertions(+), 160 deletions(-) diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 7c72d7a16..4a32e23ee 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,12 +22,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Type is the type of values this metric has. +// Type is the type of values a metric has. type MetricDescriptor_Type int32 const ( - // UNDEFINED is the default Type, it MUST not be used. - MetricDescriptor_UNDEFINED MetricDescriptor_Type = 0 + // TYPE_INVALID is the default Type, it MUST not be used. + MetricDescriptor_TYPE_INVALID MetricDescriptor_Type = 0 // INT64 values are represents as signed 64-bit integers. // // A Metric of this Type MUST assign values to the int64_value field in @@ -49,14 +49,14 @@ const ( ) var MetricDescriptor_Type_name = map[int32]string{ - 0: "UNDEFINED", + 0: "TYPE_INVALID", 1: "INT64", 2: "DOUBLE", 3: "DISTRIBUTION", } var MetricDescriptor_Type_value = map[string]int32{ - "UNDEFINED": 0, + "TYPE_INVALID": 0, "INT64": 1, "DOUBLE": 2, "DISTRIBUTION": 3, @@ -70,53 +70,90 @@ func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 0} } -// Temporality describes how metric values are reported over time. +// Temporality is the temporal quality values of a metric have. It +// describes how those values relate to the time interval over which they +// are reported. type MetricDescriptor_Temporality int32 const ( - // UNSPECIFIED is the default Temporality, it MUST not be used. - MetricDescriptor_UNSPECIFIED MetricDescriptor_Temporality = 0 + // TEMPORALITY_INVALID is the default Temporality, it MUST not be + // used. + MetricDescriptor_TEMPORALITY_INVALID MetricDescriptor_Temporality = 0 // INSTANTANEOUS is a metric whose values are measured at a particular - // instant. - // - // If an INSTANTANEOUS metric is reported over any time interval the - // values are representative of distinct measurements within the - // interval. + // instant. The values are not aggregated over any time interval and are + // unique per timestamp. MetricDescriptor_INSTANTANEOUS MetricDescriptor_Temporality = 1 - // DELTA is a metric whose values are measured and successively - // aggregated over a reporting interval. The reported value represents - // the change from the previous interval. + // DELTA is a metric whose values are the aggregation of measurements + // made over a time interval. Successive metrics contain aggregation of + // values from continuous and non-overlapping intervals. + // + // The values for a DELTA metric are based only on the time interval + // associated with one measurement cycle. There is no dependency on + // previous measurements like is the case for CUMULATIVE metrics. // - // Each reported value for a DELTA metric over a time interval is - // self-contained, the values do not depend on values in other time - // intervals. This is unlike a CUMMULATIVE metric where values are sums - // of all measured events in the time interval and all previously - // measured values of the metric. + // For example, consider a system measuring the number of requests that + // it receives every second and reports the sum of these requests as a + // DELTA metric: // - // DELTA metrics are not guaranteed to be monotonic. + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0+1 to + // t_0+2 with a value of 2. MetricDescriptor_DELTA MetricDescriptor_Temporality = 2 - // CUMULATIVE is a metric whose values are measured and successively - // added to the lifetime total of the metric. + // CUMULATIVE is a metric whose values are the aggregation of + // successively made measurements from a fixed start time until the last + // reported measurement. This means that current values of a CUMULATIVE + // metric depend on all previous measurements since the start time. + // Because of this, the sender is required to retain this state in some + // form. If this state is lost or invalidated, the CUMULATIVE metric + // values MUST be reset and a new fixed start time following the last + // reported measurement time sent MUST be used. // - // Each reported value for a CUMULATIVE metric is the sum of all - // measurements up to and including that one. + // For example, consider a system measuring the number of requests that + // it receives every second and reports the sum of these requests as a + // CUMULATIVE metric: // - // CUMULATIVE metrics are not guaranteed to be monotonic. + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+2 with a value of 5. + // 9. The system experiences a fault and loses state. + // 10. The system recovers and resumes receiving at time=t_1. + // 11. A request is received, the system measures 1 request. + // 12. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_1 to + // t_0+1 with a value of 1. MetricDescriptor_CUMULATIVE MetricDescriptor_Temporality = 3 ) var MetricDescriptor_Temporality_name = map[int32]string{ - 0: "UNSPECIFIED", + 0: "TEMPORALITY_INVALID", 1: "INSTANTANEOUS", 2: "DELTA", 3: "CUMULATIVE", } var MetricDescriptor_Temporality_value = map[string]int32{ - "UNSPECIFIED": 0, - "INSTANTANEOUS": 1, - "DELTA": 2, - "CUMULATIVE": 3, + "TEMPORALITY_INVALID": 0, + "INSTANTANEOUS": 1, + "DELTA": 2, + "CUMULATIVE": 3, } func (x MetricDescriptor_Temporality) String() string { @@ -127,27 +164,31 @@ func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 1} } -// Monotonic describes the metric values to be entirely non-increasing, -// or entirely non-decreasing. +// Monotonic is a refinement of the values a metric has. It defines the +// relationship values of successively reported metrics have +// (non-increasing, non-decreasing, or unknown). This is a refinement of +// the metric values that can be useful for a receiver in understanding +// how to deal with discontinuities in the data (i.e. calculating +// derivates of the data without introducing artifacts from a reset). type MetricDescriptor_Monotonic int32 const ( - // UNKNOWN is the default, and means it the monotonic nature of the - // metric values is known. - MetricDescriptor_UNKNOWN MetricDescriptor_Monotonic = 0 + // MONOTONIC_UNSPECIFIED is the default, and means the monotonic nature + // of the metric values is unknown. + MetricDescriptor_MONOTONIC_UNSPECIFIED MetricDescriptor_Monotonic = 0 // NONDECREASING means all the successive metric values increase or // remain constant. MetricDescriptor_NONDECREASING MetricDescriptor_Monotonic = 1 ) var MetricDescriptor_Monotonic_name = map[int32]string{ - 0: "UNKNOWN", + 0: "MONOTONIC_UNSPECIFIED", 1: "NONDECREASING", } var MetricDescriptor_Monotonic_value = map[string]int32{ - "UNKNOWN": 0, - "NONDECREASING": 1, + "MONOTONIC_UNSPECIFIED": 0, + "NONDECREASING": 1, } func (x MetricDescriptor_Monotonic) String() string { @@ -158,25 +199,26 @@ func (MetricDescriptor_Monotonic) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 2} } -// Domain describes the set of numbers metric values belong to if any. +// Domain is a refinement of the values a metric has. It describes the set +// of numbers metric values belong to, if any. type MetricDescriptor_Domain int32 const ( - // NONE is the default, and means the metric values do not belong to any - // particular domain other than the value type itself. - MetricDescriptor_NONE MetricDescriptor_Domain = 0 + // DOMAIN_UNSPECIFIED is the default, and means the metric values do + // not belong to any particular domain other than the Type itself. + MetricDescriptor_DOMAIN_UNSPECIFIED MetricDescriptor_Domain = 0 // NONNEGATIVE is the set of numbers greater than or equal to zero. MetricDescriptor_NONNEGATIVE MetricDescriptor_Domain = 1 ) var MetricDescriptor_Domain_name = map[int32]string{ - 0: "NONE", + 0: "DOMAIN_UNSPECIFIED", 1: "NONNEGATIVE", } var MetricDescriptor_Domain_value = map[string]int32{ - "NONE": 0, - "NONNEGATIVE": 1, + "DOMAIN_UNSPECIFIED": 0, + "NONNEGATIVE": 1, } func (x MetricDescriptor_Domain) String() string { @@ -507,18 +549,21 @@ func (m *Metric_Data) GetDistributionValue() *Distribution { type MetricDescriptor struct { // name of the metric. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // description of the metric. - // - // This description is commonly used in documentation so it should be a - // human-readable explanation of the metric. + // description of the metric. This description is commonly used in + // documentation so it should be a human-readable explanation of the + // metric. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` - Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` + Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` + // type is the Type of values this metric has. + Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"` + // temporality is the Temporality of values this metric has. Temporality MetricDescriptor_Temporality `protobuf:"varint,5,opt,name=temporality,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Temporality" json:"temporality,omitempty"` - Monotonic MetricDescriptor_Monotonic `protobuf:"varint,6,opt,name=monotonic,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Monotonic" json:"monotonic,omitempty"` - Domain MetricDescriptor_Domain `protobuf:"varint,7,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` + // monotonic describes the Monotonic refinement of values this metric has. + Monotonic MetricDescriptor_Monotonic `protobuf:"varint,6,opt,name=monotonic,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Monotonic" json:"monotonic,omitempty"` + // domain describes the Domain refinement of values this metric has. + Domain MetricDescriptor_Domain `protobuf:"varint,7,opt,name=domain,proto3,enum=opentelemetry.proto.metrics.v1.MetricDescriptor_Domain" json:"domain,omitempty"` // The set of labels associated with the metric descriptor. Labels in this // list apply to all data points. Labels []*v11.StringKeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` @@ -577,28 +622,28 @@ func (m *MetricDescriptor) GetType() MetricDescriptor_Type { if m != nil { return m.Type } - return MetricDescriptor_UNDEFINED + return MetricDescriptor_TYPE_INVALID } func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { if m != nil { return m.Temporality } - return MetricDescriptor_UNSPECIFIED + return MetricDescriptor_TEMPORALITY_INVALID } func (m *MetricDescriptor) GetMonotonic() MetricDescriptor_Monotonic { if m != nil { return m.Monotonic } - return MetricDescriptor_UNKNOWN + return MetricDescriptor_MONOTONIC_UNSPECIFIED } func (m *MetricDescriptor) GetDomain() MetricDescriptor_Domain { if m != nil { return m.Domain } - return MetricDescriptor_NONE + return MetricDescriptor_DOMAIN_UNSPECIFIED } func (m *MetricDescriptor) GetLabels() []*v11.StringKeyValue { @@ -853,67 +898,68 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0xc7, 0x3b, 0xf6, 0xc6, 0x89, 0xcf, 0xa6, 0xc9, 0x66, 0x54, 0xc1, 0x2a, 0x52, 0xa9, 0x6b, - 0x24, 0x30, 0xa4, 0x59, 0x93, 0xb4, 0x14, 0x09, 0x01, 0x25, 0x8e, 0xb7, 0xd5, 0xaa, 0xc9, 0x38, - 0x1a, 0xdb, 0xa5, 0x02, 0x81, 0xb5, 0xb6, 0x47, 0xe9, 0x08, 0xef, 0x8c, 0xb5, 0x3b, 0x1b, 0xc5, - 0x0f, 0xc0, 0x43, 0x70, 0xc3, 0x13, 0x71, 0xc3, 0x05, 0x17, 0xdc, 0xf1, 0x24, 0x08, 0xed, 0xcc, - 0x6e, 0xe2, 0x44, 0x4e, 0xd2, 0x80, 0x7a, 0x37, 0x73, 0x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x3f, 0x33, 0x95, 0xb8, 0x4b, 0xfa, 0x47, 0x79, 0x7c, 0x9b, 0x4f, 0xd3, 0x6b, 0xe9, 0x5c, - 0x5a, 0x30, 0xf0, 0xc7, 0xb0, 0xce, 0x4e, 0xa7, 0x13, 0x3e, 0xe2, 0x6a, 0x30, 0x94, 0xa9, 0x18, - 0x27, 0x6e, 0xa5, 0x56, 0x6e, 0x20, 0xba, 0x56, 0x98, 0x5b, 0xda, 0xba, 0xf9, 0x6b, 0x09, 0x2a, - 0x26, 0xf9, 0x8a, 0xf6, 0x5e, 0xc3, 0x0a, 0x3b, 0x65, 0xd1, 0x74, 0x12, 0xc6, 0xba, 0x47, 0xfb, - 0xe6, 0x8f, 0x66, 0x41, 0x65, 0x9e, 0x9f, 0x33, 0xe8, 0x19, 0x6d, 0xf3, 0x37, 0x04, 0x2b, 0x85, - 0x39, 0x3b, 0xdc, 0x5c, 0x4c, 0x48, 0xeb, 0x62, 0x36, 0x57, 0x5c, 0x96, 0xa5, 0xc5, 0x97, 0x65, - 0x07, 0xec, 0x50, 0xa9, 0x70, 0xf4, 0x26, 0xfb, 0xff, 0x4c, 0xdc, 0xf2, 0x7f, 0x99, 0xed, 0x79, - 0x42, 0x4b, 0xc1, 0x43, 0x2e, 0x6f, 0x68, 0xb6, 0xb5, 0x9a, 0x3f, 0x0a, 0x8e, 0x32, 0xc7, 0x11, - 0xfa, 0xfe, 0xd9, 0x31, 0x57, 0x6f, 0xd2, 0x61, 0x76, 0x44, 0x33, 0x4b, 0xdd, 0x3e, 0x7f, 0x5c, - 0x5d, 0x20, 0x6d, 0x9b, 0xa7, 0xd6, 0x31, 0x13, 0xcd, 0xe3, 0xf9, 0xb7, 0xde, 0xb0, 0xa2, 0x1d, - 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x48, 0x44, 0xc1, 0xbc, 0x14, 0x0a, 0x00, 0x00, + // 1008 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00,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x47, 0x6f, 0x56, 0xaf, 0xd5, 0x0d, 0x44, 0x80, 0x65, 0xe2, 0xee, 0xef, 0x25, 0xa8, 0xa4, + 0x53, 0x64, 0x83, 0x3e, 0x0b, 0xc6, 0x64, 0x16, 0x9b, 0x9a, 0x64, 0xed, 0xad, 0xf8, 0x64, 0x03, + 0x11, 0x51, 0x76, 0xf2, 0x2d, 0x59, 0x1c, 0x07, 0xb3, 0x84, 0xe0, 0x2c, 0xf9, 0x7f, 0xde, 0xee, + 0x03, 0xa8, 0x51, 0x26, 0x9e, 0x3d, 0x1d, 0x9d, 0xa6, 0x8b, 0x9a, 0x95, 0xba, 0xd6, 0x2c, 0x63, + 0x90, 0x26, 0x59, 0x06, 0x7a, 0x08, 0x9b, 0x53, 0x9e, 0x8c, 0x67, 0x24, 0x8b, 0x58, 0xab, 0x6b, + 0x4d, 0x0d, 0xd7, 0x94, 0x4d, 0x85, 0x7c, 0x0f, 0x68, 0x4a, 0x63, 0x11, 0xd1, 0x71, 0x22, 0x3b, + 0x55, 0x05, 0xea, 0xf2, 0x83, 0x3f, 0x5e, 0x25, 0x60, 0xb7, 0x90, 0x89, 0x77, 0x8a, 0x1c, 0x09, + 0x6f, 0xfc, 0xac, 0x83, 0x71, 0xb5, 0x29, 0x10, 0x82, 0x0a, 0x0b, 0x42, 0x75, 0x17, 0x54, 0xb1, + 0x1c, 0xa3, 0x3a, 0xd4, 0xf2, 0x76, 0xa3, 0x9c, 0x49, 0x79, 0xaa, 0xb8, 0x68, 0x4a, 0xb3, 0x12, + 0x46, 0x85, 0x94, 0xa2, 0x8a, 0xe5, 0x18, 0x39, 0x50, 0x11, 0x8b, 0xb9, 0xda, 0xf8, 0xd6, 0x35, + 0xa7, 0xea, 0x86, 0xf6, 0xb4, 0xfc, 0xc5, 0x9c, 0x60, 0x89, 0x40, 0x3f, 0x42, 0x4d, 0x90, 0x70, + 0xce, 0xa3, 0x60, 0x46, 0xc5, 0x42, 0x0a, 0xb5, 0x75, 0xf0, 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b8, 0xba, 0xbf, 0x34, 0xa9, 0x8b, 0x9a, 0x5c, 0x73, 0xa7, 0x96, 0x96, 0xdf, + 0xa9, 0x1e, 0xd4, 0x02, 0x21, 0x82, 0xc9, 0xeb, 0xf4, 0x37, 0x1b, 0x9b, 0xe5, 0x7f, 0x73, 0x04, + 0x8a, 0x84, 0x8e, 0x80, 0x87, 0x94, 0xaf, 0xd8, 0x6c, 0x67, 0x33, 0x7b, 0x3b, 0x1c, 0xa5, 0x8e, + 0x23, 0xed, 0xbb, 0xe7, 0x27, 0x54, 0xbc, 0x4e, 0xc6, 0xe9, 0x12, 0xad, 0x34, 0x75, 0xef, 0xe2, + 0x0d, 0x76, 0x89, 0xb4, 0xa7, 0x5e, 0x64, 0x27, 0x84, 0xb5, 0x4e, 0x8a, 0x4f, 0xc2, 0xb1, 0x2e, + 0x1d, 0x4f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x15, 0x1e, 0x46, 0x53, 0x3b, 0x0a, 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 676f11bc4..8ff978b7f 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -182,20 +182,19 @@ message MetricDescriptor { // name of the metric. string name = 1; - // description of the metric. - // - // This description is commonly used in documentation so it should be a - // human-readable explanation of the metric. + // description of the metric. This description is commonly used in + // documentation so it should be a human-readable explanation of the + // metric. string description = 2; // unit in which the metric value is reported. Follows the format // described by http://unitsofmeasure.org/ucum.html. string unit = 3; - // Type is the type of values this metric has. + // Type is the type of values a metric has. enum Type { - // UNDEFINED is the default Type, it MUST not be used. - UNDEFINED = 0; + // TYPE_INVALID is the default Type, it MUST not be used. + TYPE_INVALID = 0; // INT64 values are represents as signed 64-bit integers. // @@ -218,67 +217,117 @@ message MetricDescriptor { // field in its Data. DISTRIBUTION = 3; } + + // type is the Type of values this metric has. Type type = 4; - // Temporality describes how metric values are reported over time. + // Temporality is the temporal quality values of a metric have. It + // describes how those values relate to the time interval over which they + // are reported. enum Temporality { - // UNSPECIFIED is the default Temporality, it MUST not be used. - UNSPECIFIED = 0; + // TEMPORALITY_INVALID is the default Temporality, it MUST not be + // used. + TEMPORALITY_INVALID = 0; // INSTANTANEOUS is a metric whose values are measured at a particular - // instant. - // - // If an INSTANTANEOUS metric is reported over any time interval the - // values are representative of distinct measurements within the - // interval. + // instant. The values are not aggregated over any time interval and are + // unique per timestamp. INSTANTANEOUS = 1; - // DELTA is a metric whose values are measured and successively - // aggregated over a reporting interval. The reported value represents - // the change from the previous interval. + // DELTA is a metric whose values are the aggregation of measurements + // made over a time interval. Successive metrics contain aggregation of + // values from continuous and non-overlapping intervals. + // + // The values for a DELTA metric are based only on the time interval + // associated with one measurement cycle. There is no dependency on + // previous measurements like is the case for CUMULATIVE metrics. // - // Each reported value for a DELTA metric over a time interval is - // self-contained, the values do not depend on values in other time - // intervals. This is unlike a CUMMULATIVE metric where values are sums - // of all measured events in the time interval and all previously - // measured values of the metric. + // For example, consider a system measuring the number of requests that + // it receives every second and reports the sum of these requests as a + // DELTA metric: // - // DELTA metrics are not guaranteed to be monotonic. + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0+1 to + // t_0+2 with a value of 2. DELTA = 2; - // CUMULATIVE is a metric whose values are measured and successively - // added to the lifetime total of the metric. + // CUMULATIVE is a metric whose values are the aggregation of + // successively made measurements from a fixed start time until the last + // reported measurement. This means that current values of a CUMULATIVE + // metric depend on all previous measurements since the start time. + // Because of this, the sender is required to retain this state in some + // form. If this state is lost or invalidated, the CUMULATIVE metric + // values MUST be reset and a new fixed start time following the last + // reported measurement time sent MUST be used. // - // Each reported value for a CUMULATIVE metric is the sum of all - // measurements up to and including that one. + // For example, consider a system measuring the number of requests that + // it receives every second and reports the sum of these requests as a + // CUMULATIVE metric: // - // CUMULATIVE metrics are not guaranteed to be monotonic. + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+2 with a value of 5. + // 9. The system experiences a fault and loses state. + // 10. The system recovers and resumes receiving at time=t_1. + // 11. A request is received, the system measures 1 request. + // 12. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_1 to + // t_0+1 with a value of 1. CUMULATIVE = 3; } + + // temporality is the Temporality of values this metric has. Temporality temporality = 5; - // Monotonic describes the metric values to be entirely non-increasing, - // or entirely non-decreasing. + // Monotonic is a refinement of the values a metric has. It defines the + // relationship values of successively reported metrics have + // (non-increasing, non-decreasing, or unknown). This is a refinement of + // the metric values that can be useful for a receiver in understanding + // how to deal with discontinuities in the data (i.e. calculating + // derivates of the data without introducing artifacts from a reset). enum Monotonic { - // UNKNOWN is the default, and means it the monotonic nature of the - // metric values is known. - UNKNOWN = 0; + // MONOTONIC_UNSPECIFIED is the default, and means the monotonic nature + // of the metric values is unknown. + MONOTONIC_UNSPECIFIED = 0; // NONDECREASING means all the successive metric values increase or // remain constant. NONDECREASING = 1; } + + // monotonic describes the Monotonic refinement of values this metric has. Monotonic monotonic = 6; - // Domain describes the set of numbers metric values belong to if any. + // Domain is a refinement of the values a metric has. It describes the set + // of numbers metric values belong to, if any. enum Domain { - // NONE is the default, and means the metric values do not belong to any - // particular domain other than the value type itself. - NONE = 0; + // DOMAIN_UNSPECIFIED is the default, and means the metric values do + // not belong to any particular domain other than the Type itself. + DOMAIN_UNSPECIFIED = 0; // NONNEGATIVE is the set of numbers greater than or equal to zero. NONNEGATIVE = 1; } + + // domain describes the Domain refinement of values this metric has. Domain domain = 7; // The set of labels associated with the metric descriptor. Labels in this