Skip to content

fix(trace): Fix TraceState vendor-id length validation to match W3C spec#5173

Open
64johnlee wants to merge 1 commit intoopen-telemetry:mainfrom
64johnlee:fix/5136-tracestate-validation
Open

fix(trace): Fix TraceState vendor-id length validation to match W3C spec#5173
64johnlee wants to merge 1 commit intoopen-telemetry:mainfrom
64johnlee:fix/5136-tracestate-validation

Conversation

@64johnlee
Copy link
Copy Markdown

Summary

The W3C Trace Context spec defines vendor-id as lcalpha 0*14( key-chars ), allowing up to 15 characters.

The previous regex {0,13} only allowed 14 characters. This PR fixes the vendor-id length validation to match the W3C spec.

Fixes #5136.

The W3C Trace Context spec defines vendor-id as:
  vendor-id = lcalpha 0*14( key-chars )

This allows up to 15 characters (1 lcalpha + up to 14 key-chars),
but the previous regex only allowed 14 (lcalpha + 13 key-chars).

Also fix the vendor portion from {0,13} to {0,14} to match the spec.

Fixes open-telemetry#5136.

Signed-off-by: John Lee <john.lee.64john@gmail.com>
@64johnlee 64johnlee requested a review from a team as a code owner May 5, 2026 00:26
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Missing ID CLA Not Signed

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

TraceState does not check illegal inputs

1 participant