Skip to content

Commit 8319b61

Browse files
committed
WIP
1 parent cd6104b commit 8319b61

File tree

1 file changed

+22
-0
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,28 @@ def _create_aggregation(
756756
raise Exception(f"Invalid instrument type {type(instrument)} found")
757757

758758

759+
class ExponentialBucketHistogramAggregateion(Aggregation):
760+
761+
def __init__(
762+
self,
763+
max_size: int = 160,
764+
):
765+
766+
self._max_size = max_size
767+
768+
def _create_aggregation(
769+
self,
770+
instrument: Instrument,
771+
attributes: Attributes,
772+
start_time_unix_nano: int,
773+
) -> _Aggregation:
774+
return _ExponentialBucketHistogramAggregation(
775+
attributes,
776+
start_time_unix_nano,
777+
max_size=self._max_size,
778+
)
779+
780+
759781
class ExplicitBucketHistogramAggregation(Aggregation):
760782
"""This aggregation informs the SDK to collect:
761783

0 commit comments

Comments
 (0)