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

Ensure same time is used for updated time, and for expiration test #2745

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Mar 20, 2021

Ensure consistency, data points coming in the same batch are either all dropped or all exported.

Signed-off-by: Bogdan Drutu [email protected]

@bogdandrutu bogdandrutu requested a review from a team March 20, 2021 17:03
@codecov
Copy link

codecov bot commented Mar 20, 2021

Codecov Report

Merging #2745 (56bd3cb) into main (3488938) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2745      +/-   ##
==========================================
- Coverage   91.67%   91.67%   -0.01%     
==========================================
  Files         294      294              
  Lines       15640    15636       -4     
==========================================
- Hits        14338    14334       -4     
  Misses        891      891              
  Partials      411      411              
Impacted Files Coverage Δ
exporter/prometheusexporter/accumulator.go 100.00% <100.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 3488938...56bd3cb. Read the comment docs.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Please add the motivation of the change in the PR description / commit message.

Ensure consistency, data points coming in the same batch are either all dropped or all exported.

Signed-off-by: Bogdan Drutu <[email protected]>
n++
continue
}
mv := v.(*accumulatedValue)

if ts.Before(mv.value.IntGauge().DataPoints().At(0).Timestamp().AsTime()) {
if ip.Timestamp().AsTime().Before(mv.value.IntGauge().DataPoints().At(0).Timestamp().AsTime()) {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to your change: (mv.value.IntGauge().DataPoints().At(0).Timestamp().AsTime() doesn't look very safe. I wonder if any term here can be nil and cause a panic.

@tigrannajaryan tigrannajaryan merged commit c001a51 into open-telemetry:main Mar 30, 2021
@bogdandrutu bogdandrutu deleted the promnow branch March 30, 2021 00:55
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.

2 participants