-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update Get function in propagators to combine duplicate keys #1884
Conversation
6067cf6
to
eadf7b8
Compare
Since the Getter implementation is provided by instrumentation, not the API, is this something that we can say MUST to? I'm not sure we can do more than provide strong guidance on this, since we're not in control of all implementations. |
Agreed, same feeling (clear guidance should help a lot, hopefully!) |
Yea, I guess if being a MUST in the api spec implies that the api has to ensure any But it was already a MUST to give the first entry, so there are likely other places that will need to be updated. Would changing it to instead saying that the |
The Get function MUST return the first value of the given propagation key or return null if the key doesn't exist. | ||
The Get function returns the value for a given propagation key or returns null if | ||
the key doesn't exist. If the carrier is a type that allows duplicate keys, like | ||
a list or array as opposed to a dictionary, then `Get` MUST get all the values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to make sense given that if multiple traceparent come in, they would get concatenated and our parser would fail, satisfying the test case
https://github.com/w3c/trace-context/blob/main/test/test.py#L137
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Sounds like there is agreement so I'll get this updated soon. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
38e8faf
to
38dc657
Compare
I've made an update but have not removed the use of |
38dc657
to
1c8446b
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Ping? I've updated the PR. |
@tsloughter I think we should leave the MUST for case-sensitivity and change the treatment of duplicates to a SHOULD. |
@jmacd I don't see how they are different? Both are required to properly handle HTTP headers. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
I'd like to get this done with. If I make @jmacd suggested change will I get the necessary approvals to be able to merge it? Even tho I disagree that case sensitivity can be a MUST while combining values is a SHOULD :) |
Sorry @tsloughter, I've neglected this PR. :( |
|
||
If the getter is intended to work with the builtin propagators and the carrier | ||
is a type that allows duplicate keys, like a list or array as opposed to a | ||
dictionary, then the Get function MUST get all the values for the key and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dictionary, then the Get function MUST get all the values for the key and | |
dictionary, then the Get function SHOULD get all the values for the key and |
@tedsuo would you please provide any thoughts or recommendations for @tsloughter? |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Reopened. Ping @tedsuo ;) |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Ping @tedsuo |
Fixes #433 and #1870
Changes
This change makes it so the
Get
function used inTextMapPropagator
extraction must combine the values of duplicate keys, a requirement for supporting W3C TraceContext.