Skip to content

Commit c56866b

Browse files
authored
fix: Counter adds the delta from last collection. (#395)
1 parent 1bcbe77 commit c56866b

File tree

1 file changed

+2
-1
lines changed
  • opentelemetry/src/sdk/metrics/processors

1 file changed

+2
-1
lines changed

opentelemetry/src/sdk/metrics/processors/basic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@ impl Checkpointer for BasicLockedProcessor<'_> {
215215
// If this processor does not require memory, stale, stateless
216216
// entries can be removed. This implies that they were not updated
217217
// over the previous full collection interval.
218-
if stale && stateless && has_memory {
218+
if stale && stateless && !has_memory {
219219
return false;
220220
}
221+
return true;
221222
}
222223

223224
// Update Aggregator state to support exporting either a

0 commit comments

Comments
 (0)