Skip to content

Commit

Permalink
Fixing existing test - part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Aug 13, 2024
1 parent 6f74b3c commit 5fc775b
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ def __init__(
)
if not isinstance(self._view._aggregation, DefaultAggregation):
self._aggregation = self._view._aggregation._create_aggregation(
self._instrument, None, 0
self._instrument, None, self._view._exemplar_reservoir_factory, 0
)
else:
self._aggregation = self._instrument_class_aggregation[
self._instrument.__class__
]._create_aggregation(self._instrument, None, 0)
]._create_aggregation(
self._instrument, None, self._view._exemplar_reservoir_factory, 0
)

def conflicts(self, other: "_ViewInstrumentMatch") -> bool:
# pylint: disable=protected-access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
_logger = getLogger(__name__)


def _default_reservoir_factory(aggregationType: Type[_Aggregation]) -> ExemplarReservoirFactory:
def default_reservoir_factory(aggregationType: Type[_Aggregation]) -> ExemplarReservoirFactory:
"""Default reservoir factory per aggregation."""
if issubclass(aggregationType, _ExplicitBucketHistogramAggregation):
return AlignedHistogramBucketExemplarReservoir
Expand Down Expand Up @@ -154,7 +154,7 @@ def __init__(
self._description = description
self._attribute_keys = attribute_keys
self._aggregation = aggregation or self._default_aggregation
self._exemplar_reservoir_factory = exemplar_reservoir_factory or _default_reservoir_factory
self._exemplar_reservoir_factory = exemplar_reservoir_factory or default_reservoir_factory

# pylint: disable=too-many-return-statements
# pylint: disable=too-many-branches
Expand Down
Loading

0 comments on commit 5fc775b

Please sign in to comment.