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

Add tests to confirm observable counter aggregation bug #1516

Conversation

cijothomas
Copy link
Member

Observable counter has an aggregation bug. Most likely same issue exists for ObservableUpDownCounter as well.
This PR just adds a test that will fail, and hence ignored for now.
Will look at the fix separately.

@cijothomas cijothomas requested a review from a team February 8, 2024 08:23
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 90 lines in your changes are missing coverage. Please review.

Comparison is base (b35bf38) 62.4% compared to head (14c871a) 62.5%.

Files Patch % Lines
opentelemetry-sdk/src/metrics/mod.rs 55.0% 90 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1516     +/-   ##
=======================================
+ Coverage   62.4%   62.5%   +0.1%     
=======================================
  Files        144     144             
  Lines      19891   20091    +200     
=======================================
+ Hits       12426   12576    +150     
- Misses      7465    7515     +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM once conflict fixed.

@lalitb
Copy link
Member

lalitb commented Feb 15, 2024

We can also consider the use of parameterized tests for scenarios where only the inputs and expected outputs differ, to reduce redundant test code. Rust doesn't support it directly, but there are external crates providing this option e.g., - https://crates.io/crates/parameterized_test , or we can create a custom macro as suggested here - https://stackoverflow.com/questions/34662713/how-can-i-create-parameterized-tests-in-rust/

Not related to this PR, for future :)

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