diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index ac5a3a47..01d67f8f 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -100,10 +100,9 @@ message Metric { // Data is a list of one or more DataPoints for a single metric. Only one of the // following fields is used for the data, depending on the type of the metric defined // by MetricDescriptor.type field. - repeated Int64DataPoint int64_data_points = 2; - repeated DoubleDataPoint double_data_points = 3; - repeated HistogramDataPoint histogram_data_points = 4; - repeated SummaryDataPoint summary_data_points = 5; + repeated ScalarDataPoint scalar_data_points = 2; + repeated HistogramDataPoint histogram_data_points = 3; + repeated SummaryDataPoint summary_data_points = 4; } // Defines a metric type and its schema. @@ -239,9 +238,9 @@ message MetricDescriptor { Temporality temporality = 5; } -// Int64DataPoint is a single data point in a timeseries that describes the time-varying -// values of a int64 metric. -message Int64DataPoint { +// ScalarDataPoint is a single data point in a timeseries that describes the time-varying +// values of a int64 or double-typed metric. +message ScalarDataPoint { // The set of labels that uniquely identify this timeseries. repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; @@ -260,33 +259,11 @@ message Int64DataPoint { // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. fixed64 time_unix_nano = 3; - // value itself. - int64 value = 4; -} - -// DoubleDataPoint is a single data point in a timeseries that describes the time-varying -// value of a double metric. -message DoubleDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; - - // start_time_unix_nano is the time when the cumulative value was reset to zero. - // This is used for Counter type only. For Gauge the value is not specified and - // defaults to 0. - // - // The cumulative value is over the time interval (start_time_unix_nano, time_unix_nano]. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // Value of 0 indicates that the timestamp is unspecified. In that case the timestamp - // may be decided by the backend. - fixed64 start_time_unix_nano = 2; - - // time_unix_nano is the moment when this value was recorded. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - fixed64 time_unix_nano = 3; + // value itself: int64 case + int64 value_int64 = 4; - // value itself. - double value = 4; + // value itself: double case + double value_double = 5; } // HistogramDataPoint is a single data point in a timeseries that describes the time-varying