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

chore: context stabilization tests & logging pieces #2833

Merged

Conversation

scottgerring
Copy link
Contributor

@scottgerring scottgerring commented Mar 19, 2025

Fixes #2768
Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 98.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.8%. Comparing base (b03296c) to head (412d14d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry/src/context.rs 98.3% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2833     +/-   ##
=======================================
+ Coverage   80.7%   80.8%   +0.1%     
=======================================
  Files        124     124             
  Lines      23490   23743    +253     
=======================================
+ Hits       18961   19200    +239     
- Misses      4529    4543     +14     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scottgerring scottgerring changed the title chore: context stabilization tests & logging pieces [DRAFT] chore: context stabilization tests & logging pieces Mar 20, 2025
@scottgerring scottgerring marked this pull request as ready for review March 20, 2025 09:11
@scottgerring scottgerring requested a review from a team as a code owner March 20, 2025 09:11
Copy link
Contributor

@bantonsson bantonsson left a comment

Choose a reason for hiding this comment

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

Looks good to me, only some comments about the test_out_of_order_context_detachment_futures.

@@ -4,6 +4,9 @@
/// **internally within OpenTelemetry code** or for **custom exporters, processors and other plugins**. They are not designed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes here cause the macros to print to stdout if you are running in a test. I find it super convenient to see internal logging when debugging tests. You need to opt into this with --nocapture when you run them, otherwise the output goes to /dev/null.

@@ -25,7 +28,13 @@ macro_rules! otel_info {
{
tracing::info!( name: $name, target: env!("CARGO_PKG_NAME"), name = $name, "");
}
#[cfg(not(feature = "internal-logs"))]

#[cfg(test)]
Copy link
Member

Choose a reason for hiding this comment

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

this is a good idea. Let us do this in a separate PR, as there are some tests which setup fmt layer already, and we need to discontinue that to avoid the duplication to stdout.

Copy link
Member

Choose a reason for hiding this comment

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

#2841 opened to check this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cijothomas great - thanks! I'll chase this up.

@cijothomas cijothomas merged commit 36c48db into open-telemetry:main Mar 20, 2025
23 checks passed
@scottgerring scottgerring deleted the chore/context-stabilization branch March 21, 2025 07:37
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.

Context - Stabilization
3 participants