From 3904f44ed928df08afc076872904caa53eeed450 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 23 Jul 2021 11:00:21 -0700 Subject: [PATCH 01/13] Draft base-2 exponential histogram proto --- CHANGELOG.md | 2 +- opentelemetry/proto/metrics/v1/metrics.proto | 138 +++++++++++++++++++ 2 files changed, 139 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf897bdb6..f0623ee36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ Full list of differences found in [this compare.](https://github.com/open-teleme ### Added -* Remove if no changes for this section before release. +* ExponentialHistogram is a base-2 exponential histogram described in [OTEP 149](https://github.com/open-telemetry/oteps/pull/149). ### Removed diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 0db113e63..67297d439 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -221,6 +221,16 @@ message Histogram { AggregationTemporality aggregation_temporality = 2; } +// ExponentialHistogram represents the type of a metric that is calculated by aggregating +// as a ExponentialHistogram of all reported double measurements over a time interval. +message ExponentialHistogram { + repeated ExponentialHistogramDataPoint data_points = 1; + + // aggregation_temporality describes if the aggregator reports delta changes + // since last report time, or cumulative changes since a fixed start time. + AggregationTemporality aggregation_temporality = 2; +} + // Summary metric data are used to convey quantile summaries, // a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) // and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) @@ -431,6 +441,134 @@ message HistogramDataPoint { repeated Exemplar exemplars = 8; } +// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the +// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains +// summary statistics for a population of values, it may optionally contain the +// distribution of those values across a set of buckets. +// +message ExponentialHistogramDataPoint { + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detiled comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // count is the number of values in the population. Must be non-negative. This + // value must be equal to the sum of the "count" fields in buckets if a + // histogram is provided. + fixed64 count = 4; + + // sum of the values in the population. If count is zero then this field + // must be zero. This value must be equal to the sum of the "sum" fields in + // buckets if a histogram is provided. + // + // Note: Sum should only be filled out when measuring non-negative discrete + // events, and is assumed to be monotonic over the values of these events. + // Negative events *can* be recorded, but sum should not be filled out when + // doing so. This is specifically to enforce compatibility w/ OpenMetrics, + // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram + double sum = 5; + + // scale describes the resolution of the histogram. Boundaries are + // located at powers of the base, where: + // + // base = (2^(2^-scale)) + // + // The histogram bucket identified by `index`, a signed integer, + // contains values that are less than or equal to (base^index) and + // greater than (base^(index-1)). + // + // The positive and negative ranges of the histogram are expressed + // separately but both use the same scale to locate their boundaries. + // + // scale is valid in the range -4 through +8 inclusive. + sint32 scale = 6; + + // zero_count is the count of values that are either exactly zero or + // within the region considered zero by the instrumentation at the + // tolerated degree of precision. This bucket stores values that + // cannot be expressed using the standard exponential formula as + // well as values that have been rounded to zero. Users have the + // option to set zero_tolerance to convey additional information about + // the width of the zero region. + // + // Implementations MAY consider the zero bucket to have probability + // mass equal to (zero_count / sum). + fixed64 zero_count = 7; + + // zero_tolerance may be optionally set to convey the width of the + // zero region. When this is not set, implementations may assume + // the zero tolerance equals the smallest representable positive + // IEEE 754 double-precision floating point number, which is (2^−1074). + // + // Producers can be configured to round measurements to zero that fall + // below the zero tolerance. Users should avoid producing measurements + // that have meaningless precision near zero, as exponential buckets + // become increasingly dense in this region. + // + // Implementations MAY consider the zero bucket to have probability + // density equal to (zero_count / 2*zero_tolerance), if set. + double zero_tolerance = 8; + + // positive carries the positive range of exponential bucket counts. + SparseBuckets positive = 9; + + // negative carries the negative range of exponential bucket counts. + SparseBuckets negative = 10; + + // SparseBuckets are a sparse set of bucket counts, compactly encoded. + message SparseBuckets { + // Span encodes a run of contiguous histogram buckets. + message Span { + sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative). + uint32 length = 2; // Length of consecutive buckets. + } + + // span is a repeated list of Spans that encodes a range of + // exponential buckets, positive or negative. The offset of the + // first Span indicates the smallest index in the Histogram with + // non-zero count. Subsequent contiguous buckets will be included + // in the same Span, and subsequent Spans encode additional + // buckets separated by gaps where the histogram has zero count. + // + // The starting index of a Span equals its own offset plus the + // starting index of the previous Span plus the previous Span's + // length. As a recursive formula: + // + // starting_index(span[x+1]) = + // starting_index(span[x]) + + // span[x+1].offset + + // span[x].length + // + // For example, the two Spans [ {offset: 10, length: 3}, {offset: + // 5, length: 8} ] indicate a total of 11 buckets with indices at + // [10, 11, 12] and [18, 19, 20, 21, 22, 23, 24, 25]. + repeated Span span = 1; + + // delta is an array of counts corresponding to the buckets + // described by `span`, encoded as deltas. The indicated count + // for bucket[x] is defined as a recursive formula: + // + // bucket_count(x+1) = bucket_count(x) + delta[x+1] + repeated sint64 delta = 2; + } + + // (Optional) List of exemplars collected from + // measurements that were used to form the data point + repeated Exemplar exemplars = 8; +} + // SummaryDataPoint is a single data point in a timeseries that describes the // time-varying values of a Summary metric. message SummaryDataPoint { From e680b5938be129ac8410f7ca66f0a50bcc4c4b52 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 26 Jul 2021 16:44:03 -0700 Subject: [PATCH 02/13] update exemplars number --- opentelemetry/proto/metrics/v1/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 67297d439..49b448a52 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -566,7 +566,7 @@ message ExponentialHistogramDataPoint { // (Optional) List of exemplars collected from // measurements that were used to form the data point - repeated Exemplar exemplars = 8; + repeated Exemplar exemplars = 11; } // SummaryDataPoint is a single data point in a timeseries that describes the From b368c474f050a29352fa0e150ac64860bd2e78ef Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 9 Aug 2021 11:45:57 -0700 Subject: [PATCH 03/13] two clarifications; unrestrict scale --- opentelemetry/proto/metrics/v1/metrics.proto | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 49b448a52..29a375e8c 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -490,9 +490,11 @@ message ExponentialHistogramDataPoint { // greater than (base^(index-1)). // // The positive and negative ranges of the histogram are expressed - // separately but both use the same scale to locate their boundaries. + // separately. Negative values are mapped by their absolute value + // into the negative range using the same scale as the positive range. // - // scale is valid in the range -4 through +8 inclusive. + // scale is not restricted by the protocol, as the permissible + // values depend on the range of the data. sint32 scale = 6; // zero_count is the count of values that are either exactly zero or @@ -504,7 +506,7 @@ message ExponentialHistogramDataPoint { // the width of the zero region. // // Implementations MAY consider the zero bucket to have probability - // mass equal to (zero_count / sum). + // mass equal to (zero_count / count). fixed64 zero_count = 7; // zero_tolerance may be optionally set to convey the width of the From e62badd7a8ddee0bb2e656d6548a5e000baf9eef Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 9 Aug 2021 13:53:37 -0700 Subject: [PATCH 04/13] from feedback; remove sparse encoding; remove zero tolerance; keep exclusive lower bound --- opentelemetry/proto/metrics/v1/metrics.proto | 111 +++++-------------- 1 file changed, 26 insertions(+), 85 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 29a375e8c..166695365 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -447,39 +447,11 @@ message HistogramDataPoint { // distribution of those values across a set of buckets. // message ExponentialHistogramDataPoint { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. This value must be equal to the sum of the "sum" fields in - // buckets if a histogram is provided. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram - double sum = 5; - + // T.B.D. The Attributes, Timestamps, Flags, Count, and Sum fields will + // be copied from HistohgramDataPoint before merging. These fields arte + // identical between these two types, and both have pending changes in the + // opentelemetry-proto repository. + // scale describes the resolution of the histogram. Boundaries are // located at powers of the base, where: // @@ -509,66 +481,35 @@ message ExponentialHistogramDataPoint { // mass equal to (zero_count / count). fixed64 zero_count = 7; - // zero_tolerance may be optionally set to convey the width of the - // zero region. When this is not set, implementations may assume - // the zero tolerance equals the smallest representable positive - // IEEE 754 double-precision floating point number, which is (2^−1074). - // - // Producers can be configured to round measurements to zero that fall - // below the zero tolerance. Users should avoid producing measurements - // that have meaningless precision near zero, as exponential buckets - // become increasingly dense in this region. - // - // Implementations MAY consider the zero bucket to have probability - // density equal to (zero_count / 2*zero_tolerance), if set. - double zero_tolerance = 8; - // positive carries the positive range of exponential bucket counts. - SparseBuckets positive = 9; + Span positive = 8; // negative carries the negative range of exponential bucket counts. - SparseBuckets negative = 10; - - // SparseBuckets are a sparse set of bucket counts, compactly encoded. - message SparseBuckets { - // Span encodes a run of contiguous histogram buckets. - message Span { - sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative). - uint32 length = 2; // Length of consecutive buckets. - } - - // span is a repeated list of Spans that encodes a range of - // exponential buckets, positive or negative. The offset of the - // first Span indicates the smallest index in the Histogram with - // non-zero count. Subsequent contiguous buckets will be included - // in the same Span, and subsequent Spans encode additional - // buckets separated by gaps where the histogram has zero count. - // - // The starting index of a Span equals its own offset plus the - // starting index of the previous Span plus the previous Span's - // length. As a recursive formula: - // - // starting_index(span[x+1]) = - // starting_index(span[x]) + - // span[x+1].offset + - // span[x].length - // - // For example, the two Spans [ {offset: 10, length: 3}, {offset: - // 5, length: 8} ] indicate a total of 11 buckets with indices at - // [10, 11, 12] and [18, 19, 20, 21, 22, 23, 24, 25]. - repeated Span span = 1; - - // delta is an array of counts corresponding to the buckets - // described by `span`, encoded as deltas. The indicated count - // for bucket[x] is defined as a recursive formula: + Span negative = 9; + + // Buckets are a set of bucket counts, encoded in a contiguous array + // of counts. + message Span { + // Offset is the index of the first count expressed in this span. + // + // Note: This uses a varint encoding as a simple form of compression. + sint64 offset = 1; + + // Count is an array of counts, where count[i] carries the count + // of the bucket at index (offset+i), i.e., count[i] is the count + // of values less than or equal to base^(offset+i) and greater + // than base^(offset+i-1). // - // bucket_count(x+1) = bucket_count(x) + delta[x+1] - repeated sint64 delta = 2; + // Note: By contrast, the explicit HistogramDataPoint uses + // fixedt64. This field is expected to have many buckets, + // especially zeros, so has been selected to ensure varint + // encoding. + repeated uint64 bucket_counts = 6; } // (Optional) List of exemplars collected from // measurements that were used to form the data point - repeated Exemplar exemplars = 11; + repeated Exemplar exemplars = 10; } // SummaryDataPoint is a single data point in a timeseries that describes the From 1eca83feee6f6a8d4d40944a67351535a54186eb Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 9 Aug 2021 13:57:20 -0700 Subject: [PATCH 05/13] add flags --- opentelemetry/proto/metrics/v1/metrics.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 55bd36e3b..c9157a07b 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -527,6 +527,10 @@ message ExponentialHistogramDataPoint { // (Optional) List of exemplars collected from // measurements that were used to form the data point repeated Exemplar exemplars = 10; + + // Flags that apply to this specific data point. See DataPointFlags + // for the available flags and their meaning. + uint32 flags = 11; } // SummaryDataPoint is a single data point in a timeseries that describes the From e4f3b852aa65c4dde3310c40283f5d34d09eb3a0 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 9 Aug 2021 13:59:36 -0700 Subject: [PATCH 06/13] reformat --- opentelemetry/proto/metrics/v1/metrics.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index c9157a07b..14344b847 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -464,10 +464,10 @@ message HistogramDataPoint { // distribution of those values across a set of buckets. // message ExponentialHistogramDataPoint { - // T.B.D. The Attributes, Timestamps, Flags, Count, and Sum fields will - // be copied from HistohgramDataPoint before merging. These fields arte - // identical between these two types, and both have pending changes in the - // opentelemetry-proto repository. + // T.B.D. The Attributes, Timestamps, Count, and Sum fields will be + // copied with their comments from HistohgramDataPoint before + // merging. These fields arte identical between these two types, + // and have a pending change in the opentelemetry-proto repository. // scale describes the resolution of the histogram. Boundaries are // located at powers of the base, where: From ef3d927622b9b4beb7eb1270785e2c59836178b4 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 9 Aug 2021 14:01:11 -0700 Subject: [PATCH 07/13] renumber --- opentelemetry/proto/metrics/v1/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 14344b847..0bcf34dce 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -521,7 +521,7 @@ message ExponentialHistogramDataPoint { // fixedt64. This field is expected to have many buckets, // especially zeros, so has been selected to ensure varint // encoding. - repeated uint64 bucket_counts = 6; + repeated uint64 bucket_counts = 2; } // (Optional) List of exemplars collected from From 2535f0979e63ea5f168ca1d376c0d76caca78190 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 16 Aug 2021 16:41:27 -0700 Subject: [PATCH 08/13] Rename histogram span to Buckets --- opentelemetry/proto/metrics/v1/metrics.proto | 42 ++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 0bcf34dce..1c6b269ed 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -464,10 +464,38 @@ message HistogramDataPoint { // distribution of those values across a set of buckets. // message ExponentialHistogramDataPoint { - // T.B.D. The Attributes, Timestamps, Count, and Sum fields will be - // copied with their comments from HistohgramDataPoint before - // merging. These fields arte identical between these two types, - // and have a pending change in the opentelemetry-proto repository. + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detiled comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // count is the number of values in the population. Must be non-negative. This + // value must be equal to the sum of the "count" fields in buckets if a + // histogram is provided. + fixed64 count = 4; + + // sum of the values in the population. If count is zero then this field + // must be zero. This value must be equal to the sum of the "sum" fields in + // buckets if a histogram is provided. + // + // Note: Sum should only be filled out when measuring non-negative discrete + // events, and is assumed to be monotonic over the values of these events. + // Negative events *can* be recorded, but sum should not be filled out when + // doing so. This is specifically to enforce compatibility w/ OpenMetrics, + // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram + double sum = 5; // scale describes the resolution of the histogram. Boundaries are // located at powers of the base, where: @@ -499,14 +527,14 @@ message ExponentialHistogramDataPoint { fixed64 zero_count = 7; // positive carries the positive range of exponential bucket counts. - Span positive = 8; + Buckets positive = 8; // negative carries the negative range of exponential bucket counts. - Span negative = 9; + Buckets negative = 9; // Buckets are a set of bucket counts, encoded in a contiguous array // of counts. - message Span { + message Buckets { // Offset is the index of the first count expressed in this span. // // Note: This uses a varint encoding as a simple form of compression. From 962dc00296419b63119f5a68d945e442b444a88e Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Mon, 16 Aug 2021 17:31:58 -0700 Subject: [PATCH 09/13] add to the Metric oneof --- opentelemetry/proto/metrics/v1/metrics.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 1c6b269ed..6939d8cae 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -176,6 +176,7 @@ message Metric { // This field will be removed in ~3 months, on July 1, 2021. IntHistogram int_histogram = 8 [deprecated = true]; Histogram histogram = 9; + ExponentialHistogram exponential_histogram = 12; Summary summary = 11; } } From 6effa0faf4d34d595abd996ee7f891f6b007ed36 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 10 Sep 2021 16:18:09 -0700 Subject: [PATCH 10/13] Feedback applied. --- opentelemetry/proto/metrics/v1/metrics.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index c2a11b4f7..6d6f26fcc 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -534,7 +534,7 @@ message ExponentialHistogramDataPoint { // Buckets are a set of bucket counts, encoded in a contiguous array // of counts. message Buckets { - // Offset is the index of the first count expressed in this span. + // Offset is the bucket index of the first entry in the bucket_counts array. // // Note: This uses a varint encoding as a simple form of compression. sint32 offset = 1; @@ -545,9 +545,9 @@ message ExponentialHistogramDataPoint { // base^(offset+i+1). // // Note: By contrast, the explicit HistogramDataPoint uses - // fixedt64. This field is expected to have many buckets, - // especially zeros, so has been selected to ensure varint - // encoding. + // fixed64. This field is expected to have many buckets, + // especially zeros, so uint64 has been selected to ensure + // varint encoding. repeated uint64 bucket_counts = 2; } From 57291833510d673b397d0f2d01af2bfff6e2e5cf Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 14 Sep 2021 16:00:16 -0700 Subject: [PATCH 11/13] update count field comment --- opentelemetry/proto/metrics/v1/metrics.proto | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 6d6f26fcc..5886b063f 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -416,8 +416,7 @@ message HistogramDataPoint { fixed64 count = 4; // sum of the values in the population. If count is zero then this field - // must be zero. This value must be equal to the sum of the "sum" fields in - // buckets if a histogram is provided. + // must be zero. // // Note: Sum should only be filled out when measuring non-negative discrete // events, and is assumed to be monotonic over the values of these events. @@ -482,14 +481,13 @@ message ExponentialHistogramDataPoint { // 1970. fixed64 time_unix_nano = 3; - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. + // count is the number of values in the population. Must be + // non-negative. This value must be equal to the sum of the "bucket_counts" + // values in the positive and negative Buckets plus the "zero_count" field. fixed64 count = 4; // sum of the values in the population. If count is zero then this field - // must be zero. This value must be equal to the sum of the "sum" fields in - // buckets if a histogram is provided. + // must be zero. // // Note: Sum should only be filled out when measuring non-negative discrete // events, and is assumed to be monotonic over the values of these events. From 274daa6d121b026ad0c5c386a9b21fe3e23507ef Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 14 Sep 2021 16:01:48 -0700 Subject: [PATCH 12/13] reorder top-level points; use 10 --- opentelemetry/proto/metrics/v1/metrics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 5886b063f..2592c07a0 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -176,7 +176,7 @@ message Metric { // This field will be removed in ~3 months, on July 1, 2021. IntHistogram int_histogram = 8 [deprecated = true]; Histogram histogram = 9; - ExponentialHistogram exponential_histogram = 12; + ExponentialHistogram exponential_histogram = 10; Summary summary = 11; } } From ba60251c5ae2d203b91b25bb6587ed5097d2132b Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 14 Sep 2021 16:02:37 -0700 Subject: [PATCH 13/13] detailed->detiled --- opentelemetry/proto/metrics/v1/metrics.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 2592c07a0..687fbfd17 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -344,7 +344,7 @@ message NumberDataPoint { repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true]; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. @@ -398,7 +398,7 @@ message HistogramDataPoint { repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true]; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. @@ -469,7 +469,7 @@ message ExponentialHistogramDataPoint { repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. @@ -576,7 +576,7 @@ message SummaryDataPoint { repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true]; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. @@ -687,7 +687,7 @@ message IntDataPoint { repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970. @@ -736,7 +736,7 @@ message IntHistogramDataPoint { repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1; // StartTimeUnixNano is optional but strongly encouraged, see the - // the detiled comments above Metric. + // the detailed comments above Metric. // // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January // 1970.