Repository navigation
Skip whitespace-padded entries in W3C tracestate dd value - #360
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
|
Bits Code status: ✅ Done Comment @DataDog to request changes |
|
I can only run on private repositories. |
BenchmarksBenchmark execution time: 2026-11-05 15:05:27 Comparing candidate commit d91a1b0 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 0 unstable metrics.
|
|
@bm1549 This PR has been in draft state since its creation on August 25, the referenced ticket, APMS-20291: Datadog W3C propagation warning has been done since August 31, and it was suggested that this PR be reworked after #354. Please, do you plan to continue working on this PR, or should we archive it? |
An entry such as " t.x:y" in the dd value did not match a known key, so it was kept as an unknown entry and injected downstream as-is. Skip padded entries instead, like other malformed entries. The rest of the dd value is still used. APMS-20291
6a84a5e to
55f1838
Compare
|
@xlamorlette-datadog Reworked this. #354 already fixed the OWS issue it targeted, so it is now just skipping whitespace-padded |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
Whitespace-padded dd subentries are skipped individually while valid entries and existing tracestate list-member whitespace handling are preserved. The completed static review identified no reportable defects.
🤖 Bits Code Review · Commit 55f1838
The encoder keeps spaces in origin and trace tag values, so an entry such as "t.foo:bar ;" is valid output of this library. Checking the whole entry for padding dropped such tags on extraction. Check the key only, so values keep their spaces.
Overview
Skip
ddtracestate entries whose key has leading or trailing whitespace, such ast.x:yorbaz :bam. Before, these did not match a known key, so they were kept as unknown entries and injected downstream as-is.Motivation
system-tests'
test_headers_tracestate_dd_skips_malformed_elementssays padded keys likez:ware malformed and should be skipped. We passed the test but still forwarded them.Trailing spaces in values are kept: every tracer's encoder emits them and none drop them on extract.
Additional Notes
This PR originally fixed OWS around tracestate list members too, but #354 already fixed that (in 2.3.0).
An earlier revision checked the whole entry for padding. That dropped tags whose value ends in a space, which our own encoder can produce, so the check now looks at the key only.
Tests:
ddvalueReferences
Jira ticket: APMS-20291
Contributor Checklist