Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Counter adds the delta from last collection. #395

Merged
merged 1 commit into from Dec 23, 2020

Conversation

TommyCpp
Copy link
Contributor

@TommyCpp TommyCpp commented Dec 23, 2020

Fix #394

During each collection interval. The processor will maintain two places to store the values. cumulative and current. current won't get clear until the next time instrument gets updated. So if the instrument hasn't updated since the last collection. We should skip any change made to the cumulative part.

@TommyCpp TommyCpp requested a review from a team as a code owner December 23, 2020 02:01
@codecov
Copy link

codecov bot commented Dec 23, 2020

Codecov Report

Merging #395 (a92acd0) into master (1bcbe77) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   49.31%   49.30%   -0.01%     
==========================================
  Files          66       66              
  Lines        5376     5377       +1     
==========================================
  Hits         2651     2651              
- Misses       2725     2726       +1     
Impacted Files Coverage Δ
opentelemetry/src/sdk/metrics/processors/basic.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bcbe77...a92acd0. Read the comment docs.

Copy link
Member

@jtescher jtescher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@jtescher jtescher merged commit c56866b into open-telemetry:master Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheus: metrics keep increasing on their own
2 participants