diff --git a/gen/go/metrics/v1/metrics.pb.go b/gen/go/metrics/v1/metrics.pb.go index 5c786dc98..a5fa21eba 100644 --- a/gen/go/metrics/v1/metrics.pb.go +++ b/gen/go/metrics/v1/metrics.pb.go @@ -22,74 +22,47 @@ 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 + // INVALID_TYPE is the default Type, it MUST not be used. + MetricDescriptor_INVALID_TYPE MetricDescriptor_Type = 0 + // INT64 values are represents as signed 64-bit integers. + // + // A Metric of this Type MUST store its values as Int64DataPoint. + MetricDescriptor_INT64 MetricDescriptor_Type = 1 + // DOUBLE values are represents as double-precision floating-point + // numbers. + // + // A Metric of this Type MUST store its values as DoubleDataPoint. + MetricDescriptor_DOUBLE MetricDescriptor_Type = 2 + // Histogram measurement. + // Corresponding values are stored in HistogramDataPoint. + MetricDescriptor_HISTOGRAM MetricDescriptor_Type = 3 // 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 + MetricDescriptor_SUMMARY MetricDescriptor_Type = 4 ) 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: "INVALID_TYPE", + 1: "INT64", + 2: "DOUBLE", + 3: "HISTOGRAM", + 4: "SUMMARY", } 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, + "INVALID_TYPE": 0, + "INT64": 1, + "DOUBLE": 2, + "HISTOGRAM": 3, + "SUMMARY": 4, } func (x MetricDescriptor_Type) String() string { @@ -100,6 +73,101 @@ 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 ( + // INVALID_TEMPORALITY is the default Temporality, it MUST not be + // used. + MetricDescriptor_INVALID_TEMPORALITY 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. As such, these metrics are not expected to have + // an associated start time. + 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 and reports the sum of these requests every second 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 and reports the sum of these requests every second 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: "INVALID_TEMPORALITY", + 1: "INSTANTANEOUS", + 2: "DELTA", + 3: "CUMULATIVE", +} + +var MetricDescriptor_Temporality_value = map[string]int32{ + "INVALID_TEMPORALITY": 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} +} + // A collection of InstrumentationLibraryMetrics from a Resource. type ResourceMetrics struct { // The resource for the metrics in this message. @@ -334,8 +402,14 @@ 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"` + 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"` + // The set of labels associated with the metric descriptor. Labels in this list apply to + // all data points. + Labels []*v11.StringKeyValue `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -391,7 +465,21 @@ func (m *MetricDescriptor) GetType() MetricDescriptor_Type { if m != nil { return m.Type } - return MetricDescriptor_UNSPECIFIED + return MetricDescriptor_INVALID_TYPE +} + +func (m *MetricDescriptor) GetTemporality() MetricDescriptor_Temporality { + if m != nil { + return m.Temporality + } + return MetricDescriptor_INVALID_TEMPORALITY +} + +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 @@ -953,6 +1041,7 @@ func (m *SummaryDataPoint_ValueAtPercentile) GetValue() float64 { 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.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") @@ -971,65 +1060,68 @@ func init() { } var fileDescriptor_3c3112f9fa006917 = []byte{ - // 947 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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0x00, 0x00, 0xff, 0xff, 0xce, 0x2a, 0x11, 0x96, 0xb4, - 0x0b, 0x00, 0x00, + // 994 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0x5e, 0xc7, 0x69, 0xda, 0x9e, 0x74, 0x5b, 0x67, 0xba, 0xb0, 0x51, 0xa5, 0x5d, 0x42, 0x84, + 0xa0, 0x20, 0xea, 0xd0, 0x52, 0x2a, 0x21, 0x81, 0x20, 0x21, 0x11, 0x6b, 0x6d, 0xfe, 0x34, 0x71, + 0x2a, 0x75, 0xa5, 0x5d, 0xe3, 0x24, 0x43, 0x3a, 0xc2, 0x1e, 0x5b, 0xf6, 0xb8, 0x6a, 0x1e, 0x80, + 0x37, 0x40, 0x82, 0x07, 0x82, 0x07, 0xe0, 0x0d, 0x78, 0x00, 0x6e, 0x10, 0x2f, 0x80, 0x3c, 0xb6, + 0x63, 0x27, 0x4d, 0x1b, 0x0a, 0x37, 0xb0, 0x77, 0xc7, 0xe7, 0xe7, 0x3b, 0xdf, 0xf9, 0x99, 0xcc, + 0x04, 0x3e, 0x74, 0x5c, 0xc2, 0x38, 0xb1, 0x88, 0x4d, 0xb8, 0x37, 0xab, 0xb9, 0x9e, 0xc3, 0x9d, + 0x5a, 0x28, 0xd3, 0xb1, 0x5f, 0xbb, 0x3a, 0x4e, 0x44, 0x55, 0x18, 0xd0, 0xd3, 0x05, 0xef, 0x48, + 0xa9, 0x26, 0x2e, 0x57, 0xc7, 0x07, 0x1f, 0xac, 0x42, 0x1b, 0x3b, 0xb6, 0xed, 0xb0, 0x10, 0x2c, + 0x92, 0xa2, 0xb0, 0x03, 0x75, 0x95, 0xaf, 0x47, 0x7c, 0x27, 0xf0, 0xc6, 0x24, 0xf4, 0x4e, 0xe4, + 0xc8, 0xbf, 0xfa, 0x9b, 0x04, 0x7b, 0x38, 0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, + 0xbe, 0xc6, 0x7d, 0xef, 0x4c, 0x55, 0x54, 0x56, 0xe7, 0xfd, 0x39, 0x20, 0x56, 0x52, 0x70, 0x61, + 0xf4, 0x0f, 0x34, 0x28, 0xdd, 0x70, 0x43, 0x4f, 0x01, 0x52, 0xc7, 0x78, 0xe4, 0x19, 0x4d, 0xba, + 0x0d, 0xb9, 0xcc, 0x36, 0x34, 0x38, 0xbc, 0x4d, 0x9d, 0x35, 0x24, 0x1b, 0x3b, 0xf1, 0xf3, 0xb2, + 0x1f, 0x1a, 0xfa, 0xd2, 0x8b, 0x2f, 0xa6, 0x94, 0x5f, 0x06, 0xa3, 0x70, 0x30, 0xb5, 0x30, 0xf4, + 0x28, 0x7d, 0xa6, 0x2f, 0x20, 0x1d, 0x45, 0x8f, 0xf6, 0x29, 0x61, 0xb5, 0x69, 0xf6, 0x5f, 0xc3, + 0xa8, 0x20, 0x0c, 0x1f, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x78, 0x81, 0x13, 0x5e, 0x0c, + 0x00, 0x00, } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 6c160c7fa..46e56de6e 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -118,49 +118,25 @@ 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. + // 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; + // INVALID_TYPE is the default Type, it MUST not be used. + INVALID_TYPE = 0; + + // INT64 values are represents as signed 64-bit integers. + // + // A Metric of this Type MUST store its values as Int64DataPoint. + INT64 = 1; + + // DOUBLE values are represents as double-precision floating-point + // numbers. + // + // A Metric of this Type MUST store its values as DoubleDataPoint. + DOUBLE = 2; + + // Histogram measurement. + // Corresponding values are stored in HistogramDataPoint. + HISTOGRAM = 3; // Summary value. Some frameworks implemented Histograms as a summary of observations // (usually things like request durations and response sizes). While it @@ -168,9 +144,92 @@ message MetricDescriptor { // values, it calculates configurable percentiles over a sliding time // window. // Corresponding values are stored in SummaryDataPoint. - SUMMARY = 7; + SUMMARY = 4; } + + // type is the type of values this metric has. Type type = 4; + + // 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 { + // INVALID_TEMPORALITY is the default Temporality, it MUST not be + // used. + INVALID_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. As such, these metrics are not expected to have + // an associated start time. + 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 and reports the sum of these requests every second 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 and reports the sum of these requests every second 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; + } + + // temporality is the Temporality of values this metric has. + Temporality temporality = 5; + + // 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 = 6; } // Int64DataPoint is a single data point in a timeseries that describes the time-varying