Skip to content

[API] Baggage - Trim white spaces and check for semi colon which isn't allowed octet#7009

Merged
Kielek merged 13 commits intoopen-telemetry:mainfrom
nabutabu:trim-baggage-key-and-value
Apr 20, 2026
Merged

[API] Baggage - Trim white spaces and check for semi colon which isn't allowed octet#7009
Kielek merged 13 commits intoopen-telemetry:mainfrom
nabutabu:trim-baggage-key-and-value

Conversation

@nabutabu
Copy link
Copy Markdown
Contributor

@nabutabu nabutabu commented Mar 27, 2026

Towards #6816, #5210

Changes

  • Fixed BaggagePropagator to trim optional whitespace (OWS) around = separators
    when parsing the baggage header, as required by the
    W3C Baggage specification. This caused
    incompatibility with .NET 10's default W3C propagator, which emits headers with
    OWS (e.g. key = value), resulting in spaces being URL-encoded as + in
    outbound headers received by downstream services.
  • Fixed BaggagePropagator to strip baggage properties (;metadata) from values
    when parsing the baggage header. Semicolon is not a valid baggage-octet per
    the W3C Baggage specification and must be interpreted as the start of a property,
    not part of the value.
    (#5210)

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
    I don't think this is non-trivial but let me know if I need to do this
  • Changes in public API reviewed (if applicable)

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

Labels

perf Performance related pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants