Skip to content

Commit

Permalink
Update default explicit bucket histogram boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Sep 27, 2022
1 parent 6a61eba commit f37212b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

- Update explicit histogram bucket boundaries
([#2947](https://github.com/open-telemetry/opentelemetry-python/pull/2947))

## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0-0.34b0) - 2022-09-26


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ def __init__(
100.0,
250.0,
500.0,
750.0,
1000.0,
2500.0,
5000.0,
7500.0,
10000.0,
),
record_min_max: bool = True,
):
Expand Down Expand Up @@ -454,7 +459,12 @@ def __init__(
100.0,
250.0,
500.0,
750.0,
1000.0,
2500.0,
5000.0,
7500.0,
10000.0,
),
record_min_max: bool = True,
) -> None:
Expand Down
22 changes: 22 additions & 0 deletions opentelemetry-sdk/tests/metrics/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,28 @@ def test_collect(self):
second_histogram.time_unix_nano, first_histogram.time_unix_nano
)

def test_boundaries(self):
self.assertEqual(
_ExplicitBucketHistogramAggregation(Mock(), 0)._boundaries,
(
0.0,
5.0,
10.0,
25.0,
50.0,
75.0,
100.0,
250.0,
500.0,
750.0,
1000.0,
2500.0,
5000.0,
7500.0,
10000.0,
),
)


class TestAggregationFactory(TestCase):
def test_sum_factory(self):
Expand Down

0 comments on commit f37212b

Please sign in to comment.