Skip to content

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Sep 16, 2025

The W3C propagator is a new feature in .NET 10. We previously missed supporting digits when parsing trace state keys. According to the specification, digits are valid in keys. This change fixes that by adding support for digits in trace state keys. I am planning to back port this to 10 release.

#119767

#114583

#103174

@Copilot Copilot AI review requested due to automatic review settings September 16, 2025 18:43
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the W3C propagator trace state key parsing to support digits according to the W3C specification. The implementation was previously only accepting lowercase letters at the start of keys, but the spec allows both lowercase letters and digits.

Key changes:

  • Updated trace state key validation to accept digits (0-9) in addition to lowercase letters (a-z)
  • Modified both .NET 6+ and legacy implementations to support the expanded character set
  • Updated test cases to reflect that keys starting with digits are now valid

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
W3CPropagator.cs Updated key validation logic to accept digits in trace state keys per W3C spec
W3CPropagatorTests.cs Modified test cases to validate digit support and updated comments

@tarekgh tarekgh added area-System.Diagnostics.Activity and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 16, 2025
@tarekgh tarekgh added this to the 11.0.0 milestone Sep 16, 2025
@tarekgh tarekgh requested a review from noahfalk September 16, 2025 18:48
@tarekgh
Copy link
Member Author

tarekgh commented Sep 16, 2025

CC @MihaZupan

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-activity
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

Looks good to me and I support this getting backported to 10.0 RC2 (using Tactics Tell Mode since it clearly meets the bug fix bar).

@tarekgh tarekgh merged commit e4f5dad into dotnet:main Sep 17, 2025
88 checks passed
@tarekgh
Copy link
Member Author

tarekgh commented Sep 17, 2025

/backport to release/10.0

Copy link
Contributor

Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17784264902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants