Skip to content

Commit c424be3

Browse files
committed
Try resetting previous_collection_start_nano
Fixes open-telemetry#3974
1 parent df23d88 commit c424be3

File tree

1 file changed

+3
-3
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -764,16 +764,16 @@ def collect(
764764
is AggregationTemporality.DELTA
765765
):
766766

767-
if value_positive is None and value_negative is None:
768-
return None
769-
770767
previous_collection_start_nano = (
771768
self._previous_collection_start_nano
772769
)
773770
self._previous_collection_start_nano = (
774771
collection_start_nano
775772
)
776773

774+
if value_positive is None and value_negative is None:
775+
return None
776+
777777
return ExponentialHistogramDataPoint(
778778
attributes=self._attributes,
779779
start_time_unix_nano=previous_collection_start_nano,

0 commit comments

Comments
 (0)