[release/10.0] Fix trace state key parsing in W3C propagator to support digits #119789
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.
Backport of #119778 to release/10.0
/cc @tarekgh
Customer Impact
In .NET 10, we introduced the
W3CPropagator, which propagates inbound and outbound trace context according to the W3C specifications. Part of this context is the trace state, represented as key-value pairs. According to the spec, keys may include digits, but our implementation did not allow them. As a result, any application defining a trace state key containing digits would not have that state propagated, leading to unexpected results.Regression
It is a new feature in .NET 10.
Testing
Manually validated the fix and added a new test case to cover the case we are fixing.
Risk
Low risk, we are not changing any logic other than allowing digits in the trace state keys. We didn't touch any other parts.
Fixes #119767