Wrap label values to distinguish between empty-string and unset. (#56)

pull/57/head
Yang Song 7 years ago committed by GitHub
parent 52bd5a5342
commit 562994bff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      opencensus/proto/stats/metrics/metrics.proto

@ -83,12 +83,11 @@ message MetricDescriptor {
// A collection of data points that describes the time-varying values // A collection of data points that describes the time-varying values
// of a metric. // of a metric.
message TimeSeries { message TimeSeries {
// TODO: Wrap values to distinguish between empty-string and unset.
// TODO: Add restrictions for characters that can be used for keys and values. // TODO: Add restrictions for characters that can be used for keys and values.
// The set of label values that uniquely identify this timeseries. Apply to all // The set of label values that uniquely identify this timeseries. Apply to all
// points. The order of label values must match that of label keys in the // points. The order of label values must match that of label keys in the
// metric descriptor. // metric descriptor.
repeated string label_values = 1; repeated LabelValue label_values = 1;
// The data points of this timeseries. Point type MUST match the MetricDescriptor.type, so for // The data points of this timeseries. Point type MUST match the MetricDescriptor.type, so for
// a CUMULATIVE type only cumulative_points are present and for a GAUGE type only gauge_points // a CUMULATIVE type only cumulative_points are present and for a GAUGE type only gauge_points
@ -97,6 +96,13 @@ message TimeSeries {
repeated CumulativePoint cumulative_points = 3; repeated CumulativePoint cumulative_points = 3;
} }
message LabelValue {
// The value for the label.
string value = 1;
// If false the value field is ignored and considered not set.
bool has_value = 2;
}
// An instantaneous measurement of a value. // An instantaneous measurement of a value.
message GaugePoint { message GaugePoint {
// The moment when this gauge point was recorded. // The moment when this gauge point was recorded.

Loading…
Cancel
Save