Skip to content
Open
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ def _get_min_scale(self):
return self._min_scale

def _get_max_scale(self):
# FIXME The Go implementation uses a value of 20 here, find out the
# right value for this implementation, more information here:
# _max_scale is 20. The OpenTelemetry specification requires that
# bucket indices fit within a signed 32-bit integer. At scale 20,
# the maximum bucket index is ((MAX_NORMAL_EXPONENT + 1) << 20) - 1,
# which fits within this range. At scale 21, the maximum bucket
# index reaches the upper limit of a signed 32-bit integer, making
# it difficult to test correctness. See:
# https://github.com/lightstep/otel-launcher-go/blob/c9ca8483be067a39ab306b09060446e7fda65f35/lightstep/sdk/metric/aggregator/histogram/structure/README.md#mapping-function
# https://github.com/open-telemetry/opentelemetry-go/blob/0e6f9c29c10d6078e8131418e1d1d166c7195d61/sdk/metric/aggregator/exponential/mapping/logarithm/logarithm.go#L32-L45
return self._max_scale
Expand Down
Loading