diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 61fe5b7d..4a32e23e 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,74 +22,44 @@ 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 is the type of values a metric has. type MetricDescriptor_Type 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 + // 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 + // 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: "UNSPECIFIED", - 1: "GAUGE_INT64", - 2: "GAUGE_DOUBLE", - 3: "GAUGE_HISTOGRAM", - 4: "COUNTER_INT64", - 5: "COUNTER_DOUBLE", - 6: "CUMULATIVE_HISTOGRAM", - 7: "SUMMARY", + 0: "TYPE_INVALID", + 1: "INT64", + 2: "DOUBLE", + 3: "DISTRIBUTION", } 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, + "TYPE_INVALID": 0, + "INT64": 1, + "DOUBLE": 2, + "DISTRIBUTION": 3, } func (x MetricDescriptor_Type) String() string { @@ -100,6 +70,165 @@ func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor_3c3112f9fa006917, []int{3, 0} } +// 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 ( + // 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. 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 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. + // + // 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: + // + // 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 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. + // + // 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: + // + // 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: "TEMPORALITY_INVALID", + 1: "INSTANTANEOUS", + 2: "DELTA", + 3: "CUMULATIVE", +} + +var MetricDescriptor_Temporality_value = map[string]int32{ + "TEMPORALITY_INVALID": 0, + "INSTANTANEOUS": 1, + "DELTA": 2, + "CUMULATIVE": 3, +} + +func (x MetricDescriptor_Temporality) String() string { + return proto.EnumName(MetricDescriptor_Temporality_name, int32(x)) +} + +func (MetricDescriptor_Temporality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 1} +} + +// 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 ( + // 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: "MONOTONIC_UNSPECIFIED", + 1: "NONDECREASING", +} + +var MetricDescriptor_Monotonic_value = map[string]int32{ + "MONOTONIC_UNSPECIFIED": 0, + "NONDECREASING": 1, +} + +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 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 ( + // 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: "DOMAIN_UNSPECIFIED", + 1: "NONNEGATIVE", +} + +var MetricDescriptor_Domain_value = map[string]int32{ + "DOMAIN_UNSPECIFIED": 0, + "NONNEGATIVE": 1, +} + +func (x MetricDescriptor_Domain) String() string { + return proto.EnumName(MetricDescriptor_Domain_name, int32(x)) +} + +func (MetricDescriptor_Domain) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3c3112f9fa006917, []int{3, 3} +} + // A collection of InstrumentationLibraryMetrics from a Resource. type ResourceMetrics struct { // The resource for the metrics in this message. @@ -202,7 +331,7 @@ func (m *InstrumentationLibraryMetrics) GetMetrics() []*Metric { return nil } -// Defines a Metric which has one or more timeseries. +// Metric represents a timeseries produced by a telemetry system. // // The data model and relation between entities is shown in the diagram below. // @@ -245,25 +374,26 @@ 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. + // metric_descriptor describing this 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:"-"` + // 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{} } @@ -298,47 +428,145 @@ func (m *Metric) GetMetricDescriptor() *MetricDescriptor { return nil } -func (m *Metric) GetInt64DataPoints() []*Int64DataPoint { +func (m *Metric) GetStartTimeUnixNano() uint64 { if m != nil { - return m.Int64DataPoints + return m.StartTimeUnixNano } - return nil + return 0 +} + +func (m *Metric) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 } -func (m *Metric) GetDoubleDataPoints() []*DoubleDataPoint { +func (m *Metric) GetData() []*Metric_Data { if m != nil { - return m.DoubleDataPoints + return m.Data } return nil } -func (m *Metric) GetHistogramDataPoints() []*HistogramDataPoint { +type Metric_Data struct { + // 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. + Labels []*v11.StringKeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + // 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"` + // 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. + 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{} } +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.HistogramDataPoints + return m.Labels } return nil } -func (m *Metric) GetSummaryDataPoints() []*SummaryDataPoint { +func (m *Metric_Data) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *Metric_Data) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 +} + +func (m *Metric_Data) GetInt64Value() int64 { + if m != nil { + return m.Int64Value + } + return 0 +} + +func (m *Metric_Data) GetDoubleValue() float64 { + if m != nil { + return m.DoubleValue + } + return 0 +} + +func (m *Metric_Data) GetDistributionValue() *Distribution { if m != nil { - return m.SummaryDataPoints + return m.DistributionValue } 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. - Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,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"` - // 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"` + // 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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -394,197 +622,48 @@ func (m *MetricDescriptor) GetType() MetricDescriptor_Type { if m != nil { return m.Type } - return MetricDescriptor_UNSPECIFIED -} - -func (m *MetricDescriptor) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - 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) { - return fileDescriptor_3c3112f9fa006917, []int{4} -} - -func (m *Int64DataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Int64DataPoint.Unmarshal(m, b) -} -func (m *Int64DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Int64DataPoint.Marshal(b, m, deterministic) -} -func (m *Int64DataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int64DataPoint.Merge(m, src) -} -func (m *Int64DataPoint) XXX_Size() int { - return xxx_messageInfo_Int64DataPoint.Size(m) -} -func (m *Int64DataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_Int64DataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Int64DataPoint proto.InternalMessageInfo - -func (m *Int64DataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil + return MetricDescriptor_TYPE_INVALID } -func (m *Int64DataPoint) GetStartTimeUnixNano() uint64 { +func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { if m != nil { - return m.StartTimeUnixNano + return m.Temporality } - return 0 + return MetricDescriptor_TEMPORALITY_INVALID } -func (m *Int64DataPoint) GetTimeUnixNano() uint64 { +func (m *MetricDescriptor) GetMonotonic() MetricDescriptor_Monotonic { if m != nil { - return m.TimeUnixNano + return m.Monotonic } - return 0 + return MetricDescriptor_MONOTONIC_UNSPECIFIED } -func (m *Int64DataPoint) GetValue() int64 { +func (m *MetricDescriptor) GetDomain() MetricDescriptor_Domain { if m != nil { - return m.Value + return m.Domain } - return 0 + return MetricDescriptor_DOMAIN_UNSPECIFIED } -// 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 *MetricDescriptor) GetLabels() []*v11.StringKeyValue { if m != nil { return m.Labels } return nil } -func (m *DoubleDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *DoubleDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *DoubleDataPoint) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -// 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"` +// 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 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. @@ -595,7 +674,7 @@ type HistogramDataPoint struct { // 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"` + 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. // @@ -610,80 +689,73 @@ type HistogramDataPoint struct { // 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"` + 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 *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) 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 *HistogramDataPoint) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint.Unmarshal(m, b) +func (m *Distribution) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution.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) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution.Marshal(b, m, deterministic) } -func (m *HistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint.Merge(m, src) +func (m *Distribution) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution.Merge(m, src) } -func (m *HistogramDataPoint) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint.Size(m) +func (m *Distribution) XXX_Size() int { + return xxx_messageInfo_Distribution.Size(m) } -func (m *HistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint.DiscardUnknown(m) +func (m *Distribution) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution.DiscardUnknown(m) } -var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo - -func (m *HistogramDataPoint) GetLabels() []*v11.StringKeyValue { - if m != nil { - return m.Labels - } - return nil -} +var xxx_messageInfo_Distribution proto.InternalMessageInfo -func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64 { +func (m *Distribution) GetCount() uint64 { if m != nil { - return m.StartTimeUnixNano + return m.Count } return 0 } -func (m *HistogramDataPoint) GetTimeUnixNano() uint64 { +func (m *Distribution) GetSum() float64 { if m != nil { - return m.TimeUnixNano + return m.Sum } return 0 } -func (m *HistogramDataPoint) GetCount() uint64 { +func (m *Distribution) GetMinimum() float64 { if m != nil { - return m.Count + return m.Minimum } return 0 } -func (m *HistogramDataPoint) GetSum() float64 { +func (m *Distribution) GetMaximum() float64 { if m != nil { - return m.Sum + return m.Maximum } return 0 } -func (m *HistogramDataPoint) GetBuckets() []*HistogramDataPoint_Bucket { +func (m *Distribution) GetBuckets() []*Distribution_Bucket { if m != nil { return m.Buckets } return nil } -func (m *HistogramDataPoint) GetExplicitBounds() []float64 { +func (m *Distribution) GetExplicitBounds() []float64 { if m != nil { return m.ExplicitBounds } @@ -691,50 +763,50 @@ func (m *HistogramDataPoint) GetExplicitBounds() []float64 { } // Bucket contains values for a bucket. -type HistogramDataPoint_Bucket struct { +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 *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:"-"` + 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 *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 *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 *HistogramDataPoint_Bucket) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint_Bucket.Unmarshal(m, b) +func (m *Distribution_Bucket) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_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 *Distribution_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_Bucket.Marshal(b, m, deterministic) } -func (m *HistogramDataPoint_Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint_Bucket.Merge(m, src) +func (m *Distribution_Bucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_Bucket.Merge(m, src) } -func (m *HistogramDataPoint_Bucket) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint_Bucket.Size(m) +func (m *Distribution_Bucket) XXX_Size() int { + return xxx_messageInfo_Distribution_Bucket.Size(m) } -func (m *HistogramDataPoint_Bucket) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint_Bucket.DiscardUnknown(m) +func (m *Distribution_Bucket) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_Bucket.DiscardUnknown(m) } -var xxx_messageInfo_HistogramDataPoint_Bucket proto.InternalMessageInfo +var xxx_messageInfo_Distribution_Bucket proto.InternalMessageInfo -func (m *HistogramDataPoint_Bucket) GetCount() uint64 { +func (m *Distribution_Bucket) GetCount() uint64 { if m != nil { return m.Count } return 0 } -func (m *HistogramDataPoint_Bucket) GetExemplar() *HistogramDataPoint_Bucket_Exemplar { +func (m *Distribution_Bucket) GetExemplar() *Distribution_Bucket_Exemplar { if m != nil { return m.Exemplar } @@ -744,14 +816,14 @@ func (m *HistogramDataPoint_Bucket) GetExemplar() *HistogramDataPoint_Bucket_Exe // 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 { +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. + // 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"` @@ -760,220 +832,65 @@ type HistogramDataPoint_Bucket_Exemplar struct { 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_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 *HistogramDataPoint_Bucket_Exemplar) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Unmarshal(m, b) +func (m *Distribution_Bucket_Exemplar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Distribution_Bucket_Exemplar.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_Bucket_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Distribution_Bucket_Exemplar.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_Bucket_Exemplar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Distribution_Bucket_Exemplar.Merge(m, src) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_Size() int { - return xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.Size(m) +func (m *Distribution_Bucket_Exemplar) XXX_Size() int { + return xxx_messageInfo_Distribution_Bucket_Exemplar.Size(m) } -func (m *HistogramDataPoint_Bucket_Exemplar) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar.DiscardUnknown(m) +func (m *Distribution_Bucket_Exemplar) XXX_DiscardUnknown() { + xxx_messageInfo_Distribution_Bucket_Exemplar.DiscardUnknown(m) } -var xxx_messageInfo_HistogramDataPoint_Bucket_Exemplar proto.InternalMessageInfo +var xxx_messageInfo_Distribution_Bucket_Exemplar proto.InternalMessageInfo -func (m *HistogramDataPoint_Bucket_Exemplar) GetValue() float64 { +func (m *Distribution_Bucket_Exemplar) GetValue() float64 { if m != nil { return m.Value } return 0 } -func (m *HistogramDataPoint_Bucket_Exemplar) GetTimeUnixNano() uint64 { +func (m *Distribution_Bucket_Exemplar) GetEndTimeUnixNano() uint64 { if m != nil { - return m.TimeUnixNano + return m.EndTimeUnixNano } return 0 } -func (m *HistogramDataPoint_Bucket_Exemplar) GetAttachments() []*v11.StringKeyValue { +func (m *Distribution_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:"-"` -} - -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 *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 *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 *SummaryDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *SummaryDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} - -func (m *SummaryDataPoint) GetPercentileValues() []*SummaryDataPoint_ValueAtPercentile { - if m != nil { - return m.PercentileValues - } - return nil -} - -// 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 -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"` - 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 *SummaryDataPoint_ValueAtPercentile) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.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 *SummaryDataPoint_ValueAtPercentile) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Merge(m, src) -} -func (m *SummaryDataPoint_ValueAtPercentile) XXX_Size() int { - return xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.Size(m) -} -func (m *SummaryDataPoint_ValueAtPercentile) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint_ValueAtPercentile.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint_ValueAtPercentile proto.InternalMessageInfo - -func (m *SummaryDataPoint_ValueAtPercentile) GetPercentile() float64 { - if m != nil { - return m.Percentile - } - return 0 -} - -func (m *SummaryDataPoint_ValueAtPercentile) GetValue() float64 { - if m != nil { - return m.Value - } - 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_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") 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_Bucket)(nil), "opentelemetry.proto.metrics.v1.Distribution.Bucket") + proto.RegisterType((*Distribution_Bucket_Exemplar)(nil), "opentelemetry.proto.metrics.v1.Distribution.Bucket.Exemplar") } func init() { @@ -981,65 +898,68 @@ 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, 0xc2, 0x32, 0xad, 0x4a, 0x48, 0xce, 0x11, 0x89, 0xd1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x00, 0xff, 0xff, - 0x28, 0xab, 0x2b, 0x39, 0xfb, 0x0b, 0x00, 0x00, + // 1008 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0x71, 0x92, 0xba, 0xcd, 0x4b, 0x69, 0xdd, 0x61, 0xd9, 0x35, 0x95, 0x96, 0xcd, 0xe6, + 0x00, 0x81, 0xdd, 0x3a, 0xb4, 0xbb, 0x2c, 0x02, 0x81, 0x96, 0xa4, 0x31, 0x2b, 0x8b, 0xc4, 0xae, + 0x26, 0x4e, 0xb5, 0x0b, 0x82, 0xc8, 0x49, 0x46, 0xdd, 0x11, 0xf1, 0x4c, 0x64, 0x8f, 0xab, 0xe6, + 0xc6, 0x85, 0x3f, 0x82, 0x0b, 0x7f, 0x11, 0x17, 0x0e, 0xdc, 0xf9, 0x4b, 0x10, 0xf2, 0x8c, 0xdd, + 0xba, 0x55, 0xda, 0x6c, 0x41, 0xdc, 0x66, 0xde, 0x8f, 0xcf, 0xbc, 0xf9, 0xfa, 0xcd, 0x78, 0xe0, + 0x31, 0x9f, 0x13, 0x26, 0xc8, 0x8c, 0x84, 0x44, 0x44, 0x8b, 0xd6, 0x3c, 0xe2, 0x82, 0xb7, 0xd2, + 0x31, 0x9d, 0xc4, 0xad, 0xd3, 0xfd, 0x7c, 0x68, 0x49, 0x07, 0x7a, 0xff, 0x52, 0xb4, 0x32, 0x5a, + 0x79, 0xc8, 0xe9, 0xfe, 0xee, 0xc7, 0xcb, 0x68, 0x13, 0x1e, 0x86, 0x9c, 0xa5, 0x30, 0x35, 0x52, + 0x69, 0xbb, 0xd6, 0xb2, 0xd8, 0x88, 0xc4, 0x3c, 0x89, 0x26, 0x24, 0x8d, 0xce, 0xc7, 0x2a, 0xbe, + 0xf1, 0x97, 0x06, 0xdb, 0x38, 0x33, 0xf5, 0xd5, 0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 0xc3, + 0xcb, 0x32, 0x7c, 0x9b, 0xb0, 0xe9, 0xa5, 0xe0, 0xe7, 0x50, 0x99, 0x06, 0x22, 0x30, 0x2b, 0x52, + 0x86, 0x47, 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, 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b5, 0xd5, 0x67, 0x6b, 0x49, 0x65, 0x96, 0x9d, 0x31, 0xf0, 0x39, 0x6d, 0xf7, 0x37, 0x0d, 0x36, + 0x72, 0x73, 0xba, 0xb8, 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 ebfb2427..8ff978b7 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 a timeseries produced by a telemetry system. // // The data model and relation between entities is shown in the diagram below. // @@ -87,175 +87,268 @@ 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. + // metric_descriptor describing this 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; + // 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 = 4; + + message 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 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; + + // 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 + // 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; + } } -// 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 // 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. + // Type is the type of values a metric has. enum Type { - // Do not use this default value. - 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; + // TYPE_INVALID is the default Type, it MUST not be used. + TYPE_INVALID = 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; - - // 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; -} -// 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; + // type is the Type of values this metric has. + Type type = 4; - // 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; + // 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 { + // 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. The values are not aggregated over any time interval and are + // unique per timestamp. + INSTANTANEOUS = 1; + + // 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. + // + // 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: + // + // 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 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. + // + // 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: + // + // 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; + } - // 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; + // temporality is the Temporality of values this metric has. + Temporality temporality = 5; + + // 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 { + // 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; + } - // value itself. - int64 value = 4; -} + // monotonic describes the Monotonic refinement of values this metric has. + Monotonic monotonic = 6; -// 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; + // Domain is a refinement of the values a metric has. It describes the set + // of numbers metric values belong to, if any. + enum Domain { + // 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; - // 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; + // NONNEGATIVE is the set of numbers greater than or equal to zero. + NONNEGATIVE = 1; + } - // 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; + // domain describes the Domain refinement of values this metric has. + Domain domain = 7; - // value itself. - double value = 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 = 8; } -// 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; +// 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; - // 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; + // sum is the total sum of all values in a population. + double sum = 2; - // 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; + // minimum is the minimum observed value in a population. + double minimum = 3; - // 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; + // maximum is the maximum observed value in a population. + double maximum = 4; // Bucket contains values for a bucket. message Bucket { @@ -272,9 +365,9 @@ message HistogramDataPoint { // 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. @@ -295,7 +388,7 @@ message HistogramDataPoint { // 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; + 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. @@ -319,54 +412,5 @@ message HistogramDataPoint { // 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; -} - -// 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 { - // 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; - } - - // 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; + repeated double explicit_bounds = 6; }