Skip to content

Commit

Permalink
Update default explicit bucket histogram boundaries (#2952)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl authored Sep 28, 2022
1 parent 6a61eba commit cd4ccab
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ 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)

## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0-0.34b0) - 2022-09-26
- 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) - 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 cd4ccab

Please sign in to comment.