@@ -33,26 +33,18 @@ option java_outer_classname = "MetricsProto";
3333
3434// Defines a Metric which has one or more timeseries.
3535message Metric {
36- // The descriptor of the Metric. This is an optimization for network wire
37- // size, from data-model perspective a Metric contains always a
38- // MetricDescriptor.
39- oneof descriptor {
40- // In case of a streaming RPC can be sent only the first time a metric is
41- // reported to save network traffic.
42- MetricDescriptor metric_descriptor = 1 ;
43-
44- // In case of a streaming RPC this can be sent for metrics that already
45- // sent the MetricDescriptor once.
46- string name = 2 ;
47- }
36+ // The descriptor of the Metric.
37+ // TODO(issue #152): consider only sending the name of descriptor for
38+ // optimization.
39+ MetricDescriptor metric_descriptor = 1 ;
4840
4941 // One or more timeseries for a single metric, where each timeseries has
5042 // one or more points.
51- repeated TimeSeries timeseries = 3 ;
43+ repeated TimeSeries timeseries = 2 ;
5244
5345 // The resource for the metric. If unset, it may be set to a default value
5446 // provided for a sequence of messages in an RPC stream.
55- opencensus.proto.resource.v1.Resource resource = 4 ;
47+ opencensus.proto.resource.v1.Resource resource = 3 ;
5648}
5749
5850// Defines a metric type and its schema.
@@ -230,8 +222,9 @@ message DistributionValue {
230222 }
231223
232224 // Don't change bucket boundaries within a TimeSeries if your backend doesn't
233- // support this. To save network bandwidth this field can be sent only the
234- // first time a metric is sent when using a streaming RPC.
225+ // support this.
226+ // TODO(issue #152): consider not required to send bucket options for
227+ // optimization.
235228 BucketOptions bucket_options = 4 ;
236229
237230 message Bucket {
0 commit comments