Skip to content

Commit

Permalink
Remove temporality check from sum aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Feb 1, 2022
1 parent 09eb59e commit 85ae3fc
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ def __init__(

def aggregate(self, measurement: Measurement) -> None:

if self._instrument_temporality is AggregationTemporality.DELTA:
with self._lock:
self._value = self._value + measurement.value
else:
with self._lock:
self._value = measurement.value
with self._lock:
self._value = self._value + measurement.value

def collect(self) -> Sum:
"""
Expand Down

0 comments on commit 85ae3fc

Please sign in to comment.