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

Optimize LabelValues in metric proto #36

Merged
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
35 changes: 17 additions & 18 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,24 @@ message MetricDescriptor {
message Int64TimeSeries {
// The set of label values that uniquely identify this timeseries. Applies to
// all points. The order of label values must match that of label keys in the
// metric descriptor.
repeated LabelValue label_values = 1;
// metric descriptor. Each element in this array is the value of the key defined at the
// corresponding index of MetricDescriptor.label_keys array. The number of elements
// in this array and MetricDescriptor.label_keys array must be the same.
repeated string label_values = 1;

// The data points of this timeseries.
repeated Int64Value points = 2;
}

// eDoubleTimeSeries is a list of data points that describes the time-varying values
// DoubleTimeSeries is a list of data points that describes the time-varying values
// of a double metric.
message DoubleTimeSeries {
// The set of label values that uniquely identify this timeseries. Applies to
// all points. The order of label values must match that of label keys in the
// metric descriptor.
repeated LabelValue label_values = 1;
// metric descriptor. Each element in this array is the value of the key defined at the
// corresponding index of MetricDescriptor.label_keys array. The number of elements
// in this array and MetricDescriptor.label_keys array must be the same.
repeated string label_values = 1;

// The data points of this timeseries.
repeated DoubleValue points = 2;
Expand All @@ -184,8 +188,10 @@ message DoubleTimeSeries {
message HistogramTimeSeries {
// The set of label values that uniquely identify this timeseries. Applies to
// all points. The order of label values must match that of label keys in the
// metric descriptor.
repeated LabelValue label_values = 1;
// metric descriptor. Each element in this array is the value of the key defined at the
// corresponding index of MetricDescriptor.label_keys array. The number of elements
// in this array and MetricDescriptor.label_keys array must be the same.
repeated string label_values = 1;

// The data points of this timeseries.
repeated HistogramValue points = 2;
Expand Down Expand Up @@ -227,22 +233,15 @@ message HistogramTimeSeries {
message SummaryTimeSeries {
// The set of label values that uniquely identify this timeseries. Applies to
// all points. The order of label values must match that of label keys in the
// metric descriptor.
repeated LabelValue label_values = 1;
// metric descriptor. Each element in this array is the value of the key defined at the
// corresponding index of MetricDescriptor.label_keys array. The number of elements
// in this array and MetricDescriptor.label_keys array must be the same.
repeated string label_values = 1;

// The data points of this timeseries.
repeated SummaryValue points = 2;
}

// Label value or indication that the value is missing
message LabelValue {
// The value for the label.
string value = 1;
// If false the value field is ignored and considered not set.
// This is used to differentiate a missing label from an empty string.
bool has_value = 2;
tigrannajaryan marked this conversation as resolved.
Show resolved Hide resolved
}

// Int64Value is a timestamped measurement of int64 value.
message Int64Value {
// start_time_unixnano is the time when the cumulative value was reset to zero.
Expand Down