Skip to content

fix: with_cleared_baggage #3006

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

Merged
merged 2 commits into from
May 30, 2025
Merged

Conversation

gabotechs
Copy link
Contributor

@gabotechs gabotechs commented May 24, 2025

Fixes with_cleared_baggage method in opentelemtry::Context. Without this change, the function is just not clearing the baggage as the new empty baggage is not being wrapped with the appropriate BaggageContextValue

Changes

  • wraps the Baggage struct with a BaggageContextValue in the with_cleared_baggage method
  • adds a unit test that fails on main but succeeds in this branch

Merge requirement checklist

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

@gabotechs gabotechs requested a review from a team as a code owner May 24, 2025 19:38
Copy link

linux-foundation-easycla bot commented May 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: gabotechs / name: Gabriel (8fa1f7b)
  • ✅ login: cijothomas / name: Cijo Thomas (9801db6)

Copy link

codecov bot commented May 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.0%. Comparing base (cab5565) to head (9801db6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3006   +/-   ##
=====================================
  Coverage   80.9%   81.0%           
=====================================
  Files        126     126           
  Lines      24803   24821   +18     
=====================================
+ Hits       20088   20109   +21     
+ Misses      4715    4712    -3     

☔ 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.

@gabotechs gabotechs force-pushed the fix-clear-baggage branch 2 times, most recently from e7a1659 to e3df83f Compare May 24, 2025 19:44
@gabotechs gabotechs changed the title Fix with_cleared_baggage fix: with_cleared_baggage May 24, 2025
Copy link
Contributor

@paullegranddc paullegranddc left a comment

Choose a reason for hiding this comment

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

LGTM

@gabotechs gabotechs force-pushed the fix-clear-baggage branch from e3df83f to 8fa1f7b Compare May 27, 2025 15:22
@cijothomas cijothomas merged commit 28becc0 into open-telemetry:main May 30, 2025
27 checks passed
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