From ab82e5fdec8267dc2a726544b10af97675970847 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Wed, 23 May 2018 20:08:52 -0700 Subject: [PATCH] Metric: Add LabelKey type that has key and description. (#57) --- opencensus/proto/stats/metrics/metrics.proto | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/opencensus/proto/stats/metrics/metrics.proto b/opencensus/proto/stats/metrics/metrics.proto index e44da31..9dc28e4 100644 --- a/opencensus/proto/stats/metrics/metrics.proto +++ b/opencensus/proto/stats/metrics/metrics.proto @@ -75,9 +75,17 @@ message MetricDescriptor { } Type type = 4; - // TODO: Consider to add LabelInfo{key, description} if needed. // The label keys associated with the metric descriptor. - repeated string label_keys = 5; + repeated LabelKey label_keys = 5; +} + +// Defines a label key associated with a metric descriptor. +message LabelKey { + // The key for the label. + string key = 1; + + // A human-readable description of what this label key represents. + string description = 2; } // A collection of data points that describes the time-varying values