Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional min and max fields to histogram data model. #1915

Merged
merged 11 commits into from
Oct 1, 2021
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ release.
[#1912](https://github.com/open-telemetry/opentelemetry-specification/pull/1912),
[#1913](https://github.com/open-telemetry/opentelemetry-specification/pull/1913),
[#1938](https://github.com/open-telemetry/opentelemetry-specification/pull/1938))
- Add optional min / max fields to histogram data model.
([#1915](https://github.com/open-telemetry/opentelemetry-specification/pull/1915))

### Logs

Expand Down Expand Up @@ -57,7 +59,9 @@ release.

### OpenTelemetry Protocol

- Add environment variables for configuring the OTLP exporter protocol (`grpc`, `http/protobuf`, `http/json`) ([#1880](https://github.com/open-telemetry/opentelemetry-specification/pull/1880))
- Add environment variables for configuring the OTLP exporter protocol
jack-berg marked this conversation as resolved.
Show resolved Hide resolved
(`grpc`, `http/protobuf`, `http/json`).
([#1880](https://github.com/open-telemetry/opentelemetry-specification/pull/1880))

### SDK Configuration

Expand Down
9 changes: 9 additions & 0 deletions specification/metrics/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ Histograms consist of the following:
(00:00:00 UTC on 1 January 1970).
- A count (`count`) of the total population of points in the histogram.
- A sum (`sum`) of all the values in the histogram.
- (optional) The min (`min`) of all values in the histogram.
- (optional) The max (`max`) of all values in the histogram.
- (optional) A series of buckets with:
- Explicit boundary values. These values denote the lower and upper bounds
for buckets and whether not a given observation would be recorded in this
Expand All @@ -398,6 +400,13 @@ denotes Delta temporality where accumulated event counts are reset to zero after
and a new aggregation occurs. Cumulative, on the other hand, continues to
aggregate events, resetting with the use of a new start time.

The aggregation temporality also has implications on the min and max fields. Min
and max are more useful for Delta temporality, since the values represented by
Cumulative min and max will stabilize as more events are recorded. Additionally,
it is possible to convert min and max from Delta to Cumulative, but not from
Cumulative to Delta. When converting from Cumulative to Delta, min and max can
be dropped, or captured in an alternative representation such as a gauge.

Bucket counts are optional. A Histogram without buckets conveys a
population in terms of only the sum and count, and may be interpreted
as a histogram with single bucket covering `(-Inf, +Inf)`.
Expand Down
Binary file modified specification/metrics/img/model-delta-histogram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.