File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/state Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,8 @@ private Collection<T> collectWithDeltaAggregationTemporality() {
225225 AsynchronousMetricStorage .this .startEpochNanos ,
226226 AsynchronousMetricStorage .this .epochNanos ,
227227 attributes ,
228- /* reset= */ true );
228+ // No need to reset, aggregatorHandles is going to be cleared anyways
229+ /* reset= */ false );
229230 currentPoints .put (attributes , value );
230231 });
231232
@@ -257,6 +258,8 @@ private Collection<T> collectWithDeltaAggregationTemporality() {
257258 Map <Attributes , T > tmp = lastPoints ;
258259 lastPoints = reusablePointsMap ;
259260 reusablePointsMap = tmp ;
261+ } else {
262+ lastPoints = currentPoints ;
260263 }
261264
262265 return deltaPoints ;
@@ -271,6 +274,7 @@ private Collection<T> collectWithCumulativeAggregationTemporality() {
271274 AsynchronousMetricStorage .this .startEpochNanos ,
272275 AsynchronousMetricStorage .this .epochNanos ,
273276 attributes ,
277+ // No need to reset, aggregatorHandles is going to be cleared anyways
274278 /* reset= */ false );
275279 currentPoints .add (value );
276280 });
You can’t perform that action at this time.
0 commit comments