Skip to content

Commit cd4ccab

Browse files
authored
Update default explicit bucket histogram boundaries (#2952)
1 parent 6a61eba commit cd4ccab

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.13.0-0.34b0...HEAD)
99

10-
## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0-0.34b0) - 2022-09-26
10+
- Update explicit histogram bucket boundaries
11+
([#2947](https://github.com/open-telemetry/opentelemetry-python/pull/2947))
12+
13+
## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0) - 2022-09-26
1114

1215

1316

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ def __init__(
227227
100.0,
228228
250.0,
229229
500.0,
230+
750.0,
230231
1000.0,
232+
2500.0,
233+
5000.0,
234+
7500.0,
235+
10000.0,
231236
),
232237
record_min_max: bool = True,
233238
):
@@ -454,7 +459,12 @@ def __init__(
454459
100.0,
455460
250.0,
456461
500.0,
462+
750.0,
457463
1000.0,
464+
2500.0,
465+
5000.0,
466+
7500.0,
467+
10000.0,
458468
),
459469
record_min_max: bool = True,
460470
) -> None:

opentelemetry-sdk/tests/metrics/test_aggregation.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,28 @@ def test_collect(self):
378378
second_histogram.time_unix_nano, first_histogram.time_unix_nano
379379
)
380380

381+
def test_boundaries(self):
382+
self.assertEqual(
383+
_ExplicitBucketHistogramAggregation(Mock(), 0)._boundaries,
384+
(
385+
0.0,
386+
5.0,
387+
10.0,
388+
25.0,
389+
50.0,
390+
75.0,
391+
100.0,
392+
250.0,
393+
500.0,
394+
750.0,
395+
1000.0,
396+
2500.0,
397+
5000.0,
398+
7500.0,
399+
10000.0,
400+
),
401+
)
402+
381403

382404
class TestAggregationFactory(TestCase):
383405
def test_sum_factory(self):

0 commit comments

Comments
 (0)