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

Baggage improvements #2284

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fraillt
Copy link
Contributor

@fraillt fraillt commented Nov 7, 2024

Changes

Improve few things:

  • BaggageExt::with_baggage now "clone" baggage, instead of iterate+collect.
  • Baggage::insert_with_metadata (used everywhere) should be a bit faster, as it had redundant calculations:
    • access hashmap once (before it was twice)
    • calculate entry content length once (before it was three times, although it's so trivial that probably it's not noticeable anyway)
  • updated incorrect comment on Baggage::iter

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)

@fraillt fraillt requested a review from a team as a code owner November 7, 2024 08:14
Copy link

linux-foundation-easycla bot commented Nov 7, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 68.42105% with 12 lines in your changes missing coverage. Please review.

Project coverage is 79.6%. Comparing base (45ed2e0) to head (a20d014).

Files with missing lines Patch % Lines
opentelemetry/src/baggage.rs 68.4% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2284     +/-   ##
=======================================
- Coverage   79.6%   79.6%   -0.1%     
=======================================
  Files        123     123             
  Lines      21263   21255      -8     
=======================================
- Hits       16938   16926     -12     
- Misses      4325    4329      +4     

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

opentelemetry/src/baggage.rs Show resolved Hide resolved
opentelemetry/src/baggage.rs Show resolved Hide resolved
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