diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index ac5a3a472..f631ee829 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -403,25 +403,44 @@ message SummaryDataPoint { // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. fixed64 time_unix_nano = 3; - // The total number of recorded values since start_time. Optional since - // some systems don't expose this. + // The total number of recorded values since start_time. This field + // MUST be omitted when its true value is 1. An omitted or zero + // value is interpreted as having `count` equal to 1, and in this + // case the value of `sum`, `min`, and `max` are implied to equal + // the value of `last`. uint64 count = 4; - // The total sum of recorded values since start_time. Optional since some - // systems don't expose this. If count is zero then this field must be zero. + // The last value MUST be set to the last value that was measured + // since start_time. + double last = 7; + + // The total sum of recorded values since start_time. If the count + // was omitted or zero because its true value was 1, this field + // shall be omitted by the writer and the value of `sum` shall be + // set by the reader to value of `last`. Otherwise, this field MUST + // be set to the sum of measurements reflected in count. double sum = 5; - // Represents the value at a given percentile of a distribution. - // - // To record Min and Max values following conventions are used: - // - The 100th percentile is equivalent to the maximum value observed. - // - The 0th percentile is equivalent to the minimum value observed. - // - // See the following issue for more context: - // https://github.com/open-telemetry/opentelemetry-proto/issues/125 + // The minimum of recorded values since start_time. If the count + // was omitted or zero because its true value was 1, this field + // shall be omitted by the writer and the value of `min` shall be + // set by the reader to value of `last`. Otherwise, this field MUST + // be set to the minimum of the measurements reflected in count. + double min = 8; + + // The maximum of recorded values since start_time. If the count + // was omitted or zero because its true value was 1, this field + // shall be omitted by the writer and the value of `max` shall be + // set by the reader to value of `last`. Otherwise, this field MUST + // be set to the maximum of the measurements reflected in count. + double max = 9; + + // Represents the value at a given percentile of a distribution. To + // represent the maximum or minimum values, use `max` and `min` + // fields, do not use percentiles 0 or 100. message ValueAtPercentile { // The percentile of a distribution. Must be in the interval - // [0.0, 100.0]. + // (0.0, 100.0). double percentile = 1; // The value at the given percentile of a distribution.