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

Incorporate histogram min and max fields into histogram language, add… #1983

Merged
merged 15 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ release.
### Metrics

- Add optional min / max fields to histogram data model.
([#1915](https://github.com/open-telemetry/opentelemetry-specification/pull/1915))
([#1915](https://github.com/open-telemetry/opentelemetry-specification/pull/1915),
[#1983](https://github.com/open-telemetry/opentelemetry-specification/pull/1983))

### Logs

Expand Down
33 changes: 27 additions & 6 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ The SDK MUST provide the following `Aggregation` to support the
- [Last Value](./sdk.md#last-value-aggregation)
- [Histogram](./sdk.md#histogram-aggregation)
- [Explicit Bucket Histogram](./sdk.md#explicit-bucket-histogram-aggregation)
- [Trivial Histogram](./sdk.md#Trivial-histogram-aggregation)

#### None Aggregation

Expand Down Expand Up @@ -384,16 +385,36 @@ This Aggregation honors the following configuration parameters:

| Key | Value | Default Value | Description |
| --- | --- | --- | --- |
| Monotonic | boolean | true | if true, non-positive values are treated as errors<sup>1</sup>. |
| Temporality | Delta, Cumulative | Cumulative | See [Temporality](./datamodel.md#temporality). |
| Boundaries | double\[\] | [ 0, 5, 10, 25, 50, 75, 100, 250, 500, 1000 ] | Array of increasing values representing explicit bucket boundary values.<br><br>The Default Value represents the following buckets:<br>(-&infin;, 0], (0, 5.0], (5.0, 10.0], (10.0, 25.0], (25.0, 50.0], (50.0, 75.0], (75.0, 100.0], (100.0, 250.0], (250.0, 500.0], (500.0, 1000.0], (1000.0, +&infin;) |

\[1\]: Language implementations may choose the best strategy for handling errors. (i.e. Log, Discard, etc...)

This Aggregation informs the SDK to collect:

- Count of `Measurement` values falling within explicit bucket boundaries.
- Arithmetic sum of `Measurement` values in population.
- Min `Measurement` value in population.
- Max `Measurement` value in population.

#### Trivial Histogram Aggregation

The Trivial Histogram Aggregation informs the SDK to collect data for
the [Histogram Metric Point](./datamodel.md#histogram) using a single bucket
with boundaries (-&infin;, +&infin;). This produces lightweight histogram data
points which capture the min, max, sum and count of a population of
reyang marked this conversation as resolved.
Show resolved Hide resolved
measurements.

This Aggregation honors the following configuration parameters:

| Key | Value | Default Value | Description |
| --- | --- | --- | --- |
| Temporality | Delta, Cumulative | Delta | See [Temporality](./datamodel.md#temporality). |

This Aggregation informs the SDK to collect:

- Count of `Measurement` values in population.
- Arithmetic sum of `Measurement` values in population.
- Min `Measurement` value in population.
- Max `Measurement` value in population.
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

## Attribute limits

Expand Down Expand Up @@ -486,9 +507,9 @@ The SDK will come with two types of built-in exemplar reservoirs:
1. SimpleFixedSizeExemplarReservoir
2. AlignedHistogramBucketExemplarReservoir

By default, fixed sized histogram aggregators will use
`AlignedHistogramBucketExemplarReservoir` and all other aggregaators will use
`SimpleFixedSizeExemplarReservoir`.
By default, explicit bucket histogram aggregators, except trivial histogram
aggregators, will use `AlignedHistogramBucketExemplarReservoir`. All other
aggregators will use `SimpleFixedSizeExemplarReservoir`.
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

*SimpleExemplarReservoir*
This Exemplar reservoir MAY take a configuration parameter for the size of
Expand Down