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

refactor: refactor Baggage with Context interaction #2748

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

gruebel
Copy link
Member

@gruebel gruebel commented Mar 3, 2025

Relates to #2717 point 6

Changes

  • with_baggage() and current_with_baggage() now only accept a Baggage instance and override any existing Baggage in the Context
  • added a private BaggageContextValue to hide the direct retrieval of Baggage from Context to make sure it needs to accessed via context.baggage()

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)

@gruebel gruebel requested a review from a team as a code owner March 3, 2025 21:41
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.6%. Comparing base (baf4bfd) to head (4fc5f1c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2748   +/-   ##
=====================================
  Coverage   79.6%   79.6%           
=====================================
  Files        123     123           
  Lines      23041   23034    -7     
=====================================
  Hits       18356   18356           
+ Misses      4685    4678    -7     

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

@gruebel gruebel requested review from cijothomas and TommyCpp March 4, 2025 22:08
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 with nit comment here.

@cijothomas cijothomas merged commit a317856 into open-telemetry:main Mar 5, 2025
23 checks passed
@gruebel gruebel deleted the refactor-baggage-context branch March 5, 2025 15:18
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.

4 participants