Skip to content

trace: ParseTraceState ignores duplicated tracestate keys#4638

Closed
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
pellared:tracestate-dups
Closed

trace: ParseTraceState ignores duplicated tracestate keys#4638
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
pellared:tracestate-dups

Conversation

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 16, 2023

Codecov Report

Merging #4638 (b2f83be) into main (5dff273) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

❗ Current head b2f83be differs from pull request most recent head 5f4ac4f. Consider uploading reports for the commit 5f4ac4f to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #4638     +/-   ##
=======================================
- Coverage   81.3%   81.3%   -0.1%     
=======================================
  Files        222     222             
  Lines      17682   17682             
=======================================
- Hits       14391   14389      -2     
- Misses      2991    2993      +2     
  Partials     300     300             
Files Coverage Δ
trace/tracestate.go 100.0% <100.0%> (ø)

... and 22 files with indirect coverage changes

Comment thread trace/tracestate.go

if _, ok := found[m.Key]; ok {
return TraceState{}, wrapErr(errDuplicate)
continue // Duplicate is ignored per https://github.com/w3c/trace-context/blob/551a5b0855171281e98b4c2a814bf9e1f837cd53/test/test.py#L563-L568.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a link to W3C unit tests. Can you instead link to the part of the W3C specification that describes this behavior?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have not found anything better than the test code in the specification that describes it. See: https://github.com/instana/trace-context/blob/master/spec/20-http_request_header_format.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

@pellared pellared Oct 16, 2023

Choose a reason for hiding this comment

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

Do you have any other suggestion or can this comment be resolved?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems like this behavior is only mentioned in the editor draft of the W3C trace-context as optional. This PR seems premature given that unreleased state.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changing to draft

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It seems like this behavior is only mentioned in the editor draft of the W3C trace-context as optional.

For me even the editor draft does not clearly defines this behavior thus I created w3c/trace-context#548

@pellared pellared marked this pull request as ready for review October 17, 2023 21:22
@pellared pellared marked this pull request as draft October 17, 2023 21:25
@pellared pellared closed this Oct 23, 2023
@pellared pellared deleted the tracestate-dups branch November 17, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants