From 85ae3fcbc468f31c9e55fb5a7867611903a0baf1 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 31 Jan 2022 17:39:39 -0600 Subject: [PATCH] Remove temporality check from sum aggregate --- .../src/opentelemetry/sdk/_metrics/aggregation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py index dc402f2b50c..5d6a1634c2d 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py @@ -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: """