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 MaxScale config parameter to ExponentialHistogram #3017

Merged
merged 4 commits into from
Jan 13, 2023
Merged
Changes from 1 commit
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
26 changes: 15 additions & 11 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,16 @@ The Exponential Histogram Aggregation informs the SDK to collect data
for the [Exponential Histogram Metric
Point](./data-model.md#exponentialhistogram), which uses an exponential
formula to determine bucket boundaries and an integer `scale`
parameter to control resolution.
parameter to control resolution. Implementations adjust scale as necessary given
the data.

Scale is not a configurable property of this Aggregation, the
implementation will adjust it as necessary given the data. This
Aggregation honors the following configuration parameter:
This Aggregation honors the following configuration parameters:

| Key | Value | Default Value | Description |
|---------|---------|---------------|--------------------------------------------------------------------------------------------------------------|
| MaxSize | integer | 160 | Maximum number of buckets in each of the positive and negative ranges, not counting the special zero bucket. |
| RecordMinMax | true, false | true | Whether to record min and max. |
| Key | Value | Default Value | Description |
|--------------|-------------|---------------|--------------------------------------------------------------------------------------------------------------|
| MaxSize | integer | 160 | Maximum number of buckets in each of the positive and negative ranges, not counting the special zero bucket. |
| MaxScale | integer | 20 | Maximum `scale` factor. |
| RecordMinMax | true, false | true | Whether to record min and max. |

The default of 160 buckets is selected to establish default support
for a high-resolution histogram able to cover a long-tail latency
Expand Down Expand Up @@ -496,8 +496,11 @@ bucketMidpoint = ((base - 1) / 2) / ((base + 1) / 2) = (base - 1) /
This Aggregation uses the notion of "ideal" scale. The ideal scale is
either:

1. The maximum supported scale, generally used for single-value histogram Aggregations where scale is not otherwise constrained
2. The largest value of scale such that no more than the maximum number of buckets are needed to represent the full range of input data in either of the positive or negative ranges.
1. The `MaxScale` (see configuration parameters), generally used for
single-value histogram Aggregations where scale is not otherwise constrained.
2. The largest value of scale such that no more than the maximum number of
buckets are needed to represent the full range of input data in either of the
positive or negative ranges.

###### Handle all normal values

Expand All @@ -515,7 +518,8 @@ nearest normal value.
###### Support a minimum and maximum scale

The implementation MUST maintain reasonable minimum and maximum scale
parameters that the automatic scale parameter will not exceed.
parameters that the automatic scale parameter will not exceed. The maximum scale
is defined by the `MaxScale` configuration parameter.

###### Use the maximum scale for single measurements

Expand Down