Skip to content

Fix To Ignore empty baggage keys in ImmutableBaggage.put#8658

Open
NithinU2802 wants to merge 1 commit into
open-telemetry:mainfrom
NithinU2802:fix/ignore-empty-baggage-key
Open

Fix To Ignore empty baggage keys in ImmutableBaggage.put#8658
NithinU2802 wants to merge 1 commit into
open-telemetry:mainfrom
NithinU2802:fix/ignore-empty-baggage-key

Conversation

@NithinU2802

Copy link
Copy Markdown
Contributor

Previously, ImmutableBaggage.put Line 72 accepted empty baggage keys, allowing entries with an empty key to be added to a Baggage. The implementation has been updated to ignore empty keys, aligning the behavior with the OpenTelemetry Baggage API specification. A test has also been updated to verify that attempting to add an empty key leaves the Baggage unchanged by updating ImmutableBaggage.put_keyEmpty Line 115.

I'm happy to discuss and update any changes if needed.

Closes #8657

@NithinU2802
NithinU2802 requested a review from a team as a code owner July 24, 2026 15:30
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 24, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-26 18:31:11 UTC.

  • Waiting on: Reviewers
  • Next step: Review the latest changes.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.46%. Comparing base (6678f8e) to head (a1cdff3).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8658      +/-   ##
============================================
- Coverage     91.46%   91.46%   -0.01%     
+ Complexity    10457    10456       -1     
============================================
  Files          1021     1021              
  Lines         27647    27647              
  Branches       3242     3242              
============================================
- Hits          25288    25287       -1     
  Misses         1616     1616              
- Partials        743      744       +1     

☔ View full report in Codecov by Harness.
📢 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.

@NithinU2802

Copy link
Copy Markdown
Contributor Author

Hi @jack-berg, could you please review this PR when you get a chance.

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.

Fix: BaggageBuilder.put() accepts empty string keys instead of ignoring them

1 participant