From bc8ee79d8e01faf3310af2987268e94285f354da Mon Sep 17 00:00:00 2001 From: Victor Lu Date: Mon, 12 Jul 2021 17:27:36 -0700 Subject: [PATCH] Fix comment on explicit_bounds (#313) * Fix comment on explicit_bounds * Update metrics.proto * Define explicit_bounds using size(explicit_bounds) * Fix bug when i == size(explicit_bounds) Co-authored-by: Joshua MacDonald --- opentelemetry/proto/metrics/v1/metrics.proto | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index cf29276..0db113e 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -413,12 +413,11 @@ message HistogramDataPoint { // explicit_bounds specifies buckets with explicitly defined bounds for values. // - // This defines size(explicit_bounds) + 1 (= N) buckets. The boundaries for - // bucket at index i are: + // The boundaries for bucket at index i are: // // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < N-1 - // (explicit_bounds[i], +infinity) for i == N-1 + // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) + // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) // // The values in the explicit_bounds array must be strictly increasing. // @@ -641,12 +640,11 @@ message IntHistogramDataPoint { // explicit_bounds specifies buckets with explicitly defined bounds for values. // - // This defines size(explicit_bounds) + 1 (= N) buckets. The boundaries for - // bucket at index i are: + // The boundaries for bucket at index i are: // // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < N-1 - // (explicit_bounds[i], +infinity) for i == N-1 + // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) + // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) // // The values in the explicit_bounds array must be strictly increasing. //