diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py index d279a0d796..13ab266901 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py @@ -764,9 +764,6 @@ def collect( is AggregationTemporality.DELTA ): - if value_positive is None and value_negative is None: - return None - previous_collection_start_nano = ( self._previous_collection_start_nano ) @@ -774,6 +771,9 @@ def collect( collection_start_nano ) + if value_positive is None and value_negative is None: + return None + return ExponentialHistogramDataPoint( attributes=self._attributes, start_time_unix_nano=previous_collection_start_nano,