Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 562994b

Browse files
authored
Wrap label values to distinguish between empty-string and unset. (#56)
1 parent 52bd5a5 commit 562994b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

opencensus/proto/stats/metrics/metrics.proto

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ message MetricDescriptor {
8383
// A collection of data points that describes the time-varying values
8484
// of a metric.
8585
message TimeSeries {
86-
// TODO: Wrap values to distinguish between empty-string and unset.
8786
// TODO: Add restrictions for characters that can be used for keys and values.
8887
// The set of label values that uniquely identify this timeseries. Apply to all
8988
// points. The order of label values must match that of label keys in the
9089
// metric descriptor.
91-
repeated string label_values = 1;
90+
repeated LabelValue label_values = 1;
9291

9392
// The data points of this timeseries. Point type MUST match the MetricDescriptor.type, so for
9493
// a CUMULATIVE type only cumulative_points are present and for a GAUGE type only gauge_points
@@ -97,6 +96,13 @@ message TimeSeries {
9796
repeated CumulativePoint cumulative_points = 3;
9897
}
9998

99+
message LabelValue {
100+
// The value for the label.
101+
string value = 1;
102+
// If false the value field is ignored and considered not set.
103+
bool has_value = 2;
104+
}
105+
100106
// An instantaneous measurement of a value.
101107
message GaugePoint {
102108
// The moment when this gauge point was recorded.

0 commit comments

Comments
 (0)