Skip to content

Commit d11c205

Browse files
authored
Add MaxScale config parameter to ExponentialHistogram (open-telemetry#3017)
1 parent f4bf378 commit d11c205

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ release.
2121

2222
- Rename built-in ExemplarFilters to AlwaysOn, AlwaysOff and TraceBased.
2323
([#2919](https://github.com/open-telemetry/opentelemetry-specification/pull/2919))
24+
- Add `MaxScale` config option to Exponential Bucket Histogram Aggregation.
25+
([#3017](https://github.com/open-telemetry/opentelemetry-specification/pull/3017))
2426

2527
### Logs
2628

specification/metrics/sdk.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -456,16 +456,16 @@ The Exponential Histogram Aggregation informs the SDK to collect data
456456
for the [Exponential Histogram Metric
457457
Point](./data-model.md#exponentialhistogram), which uses an exponential
458458
formula to determine bucket boundaries and an integer `scale`
459-
parameter to control resolution.
459+
parameter to control resolution. Implementations adjust scale as necessary given
460+
the data.
460461

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

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

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

503-
1. The maximum supported scale, generally used for single-value histogram Aggregations where scale is not otherwise constrained
504-
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.
503+
1. The `MaxScale` (see configuration parameters), generally used for
504+
single-value histogram Aggregations where scale is not otherwise constrained.
505+
2. The largest value of scale such that no more than the maximum number of
506+
buckets are needed to represent the full range of input data in either of the
507+
positive or negative ranges.
505508

506509
###### Handle all normal values
507510

@@ -519,7 +522,8 @@ nearest normal value.
519522
###### Support a minimum and maximum scale
520523

521524
The implementation MUST maintain reasonable minimum and maximum scale
522-
parameters that the automatic scale parameter will not exceed.
525+
parameters that the automatic scale parameter will not exceed. The maximum scale
526+
is defined by the `MaxScale` configuration parameter.
523527

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

0 commit comments

Comments
 (0)