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 more observable counter tests #1818

Merged

Conversation

cijothomas
Copy link
Member

Demonstrating #1517
This adds more scenarios to improve coverage overall.

#1644 has the fix, but that is not yet merged as we are working through some major refactoring!

@cijothomas cijothomas requested a review from a team as a code owner May 24, 2024 06:27
Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 90.16393% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 73.6%. Comparing base (f8ee551) to head (d2c016f).

Files Patch % Lines
opentelemetry-sdk/src/metrics/mod.rs 90.1% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1818     +/-   ##
=======================================
- Coverage   73.6%   73.6%   -0.1%     
=======================================
  Files        122     122             
  Lines      19529   19515     -14     
=======================================
- Hits       14389   14376     -13     
+ Misses      5140    5139      -1     

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

// Run this test with stdout enabled to see output.
// cargo test observable_counter_aggregation --features=metrics,testing -- --nocapture
// cargo test observable_counter_aggregation_cumulative_non_zero_increment --features=testing -- --nocapture
Copy link
Member

@lalitb lalitb May 24, 2024

Choose a reason for hiding this comment

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

nit - I know this is the existing comment. Do we know what output tester may want to see with nocapture as mentioned in this comment. Not blocker, just curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

println() text is not captured in test output without this. It is used when debugging things quickly. Sometimes it is a lot easier that way, as opposed to running with RUST_FLAG to show stack when tests panic!

@cijothomas cijothomas merged commit 57f87d6 into open-telemetry:main May 24, 2024
22 checks passed
@cijothomas cijothomas deleted the cijothomas/observable-counter-tests branch May 24, 2024 17: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.

None yet

2 participants