You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/logarithm_mapping.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,12 @@ def _get_min_scale(self):
47
47
returnself._min_scale
48
48
49
49
def_get_max_scale(self):
50
-
# FIXME The Go implementation uses a value of 20 here, find out the
51
-
# right value for this implementation, more information here:
50
+
# _max_scale is 20. The OpenTelemetry specification requires that
51
+
# bucket indices fit within a signed 32-bit integer. At scale 20,
52
+
# the maximum bucket index is ((MAX_NORMAL_EXPONENT + 1) << 20) - 1,
53
+
# which fits within this range. At scale 21, the maximum bucket
54
+
# index reaches the upper limit of a signed 32-bit integer, making
0 commit comments