Repository navigation
[OpenTelemetry.Api] Avoid Baggage params enumeration - #7697
Merged
martincostello merged 5 commits intoAug 26, 2026
Merged
Conversation
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-dotnet. Important reminders:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7697 +/- ##
=======================================
Coverage 91.55% 91.55%
=======================================
Files 321 321
Lines 17982 17997 +15
=======================================
+ Hits 16463 16478 +15
Misses 1519 1519
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Pull request dashboard statusMerged · refreshed 2026-08-26 19:02 UTC Status above doesn't look right?
|
martincostello
approved these changes
Aug 26, 2026
martincostello
enabled auto-merge
August 26, 2026 13:21
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 26, 2026
Contributor
|
Thank you for your contribution @thomhurst! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
This was referenced Sep 18, 2026
This was referenced Nov 14, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Route the existing
Baggage.SetBaggage(params KeyValuePair<...>[])overloadthrough a private
ReadOnlySpan<T>implementation. This avoids boxing thearray enumerator while preserving the arbitrary
IEnumerable<T>overload andpublic API.
Benchmark
BaggageBenchmarkswas run before and after this change using BenchmarkDotNet0.15.8 on .NET 10.0.11, Windows 11, Intel Core i7-12700K.
The 20-item update case was rerun independently because the first post-change
run was noisy (
250.342 ns,33.943 nsstandard deviation). The independentrun measured
209.6 nswith5.21 nsstandard deviation.Merge requirement checklist
BaggageTestspassCHANGELOG.mdfiles updated for non-trivial changes