Skip to content

Commit

Permalink
fix: Counter adds the delta from last collection. (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyCpp committed Dec 23, 2020
1 parent 1bcbe77 commit c56866b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentelemetry/src/sdk/metrics/processors/basic.rs
Expand Up @@ -215,9 +215,10 @@ impl Checkpointer for BasicLockedProcessor<'_> {
// If this processor does not require memory, stale, stateless
// entries can be removed. This implies that they were not updated
// over the previous full collection interval.
if stale && stateless && has_memory {
if stale && stateless && !has_memory {
return false;
}
return true;
}

// Update Aggregator state to support exporting either a
Expand Down

0 comments on commit c56866b

Please sign in to comment.