Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Int64DataPoint and DoubleDataPoint into ScalarDataPoint #172

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 10 additions & 33 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand Down