-
Notifications
You must be signed in to change notification settings - Fork 893
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
Clarify that Setter sets values only. #976
Clarify that Setter sets values only. #976
Conversation
I would like to see some guidance here specifically for HTTP headers. Say,we have multiple headers with name "Foo" in the request (= carrier) and the propagator calls Set(carrier, "Foo", "bar"). Would that remove all the previous Foo headers and then add that single new one with value "bar"? |
Yes, that's all that a |
@Oberon00 Applied your feedback using slightly different wording. Please review ;) |
@open-telemetry/specs-approvers Please review this. This is a (hopefully) simple clarification on the |
Co-authored-by: Armin Ruech <[email protected]>
Co-authored-by: Armin Ruech <[email protected]>
@arminru Feedback applied, please review. |
Co-authored-by: Christian Neumüller <[email protected]>
Co-authored-by: Christian Neumüller <[email protected]>
- A `Setter` invoked for each propagation key to add or remove. This is an additional | ||
argument that languages are free to define to help inject data into the carrier. | ||
- A `Setter` to set a propagation key/value pair. Propagators MAY invoke it multiple times in order to set multiple pairs. | ||
This is an additional argument that languages are free to define to help inject data into the carrier. | ||
|
||
#### Setter argument |
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.
Actually I am confused by this spec: Does this heading describe the arguments to the setter? Should this be heading be replaced by the sentence: "Inject should have the following parameters:"?
I think we went too often back and forth on this PR and now it does not fulfill the originial intent of specifying that values are overriden/only one value per key is supposed to be retained. I think the PR is still an improvement, so my approval holds, but are you sure this is what you want @carlosalberto ? I would recommend adding some explicit wording what should happen when the setter is called with the same key multiple times or with a key that is already in the carrier (or is in the carrier multiple times even). |
To be honest, I'd like to act as @iNikem acted in the past, to avoid scope creep: this PR is doing something and if something else needs to happen, please do that in a follow up. The intention of this PR was simply to avoid using the words "add" and "remove" and use "set" instead. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
While this PR does not resolve all inconsistencies in this spec, I still think it's an improvement and should be uncontroversial enough to merge if any other @open-telemetry/specs-approvers would take a look. |
Merging as this is merely an editorial clean up. |
Clarify that
Setter
only sets values - that is, it does not adds values to existing ones.Related to #444 which aims to (potentially) add an additional
Add
operation (to added, if needed, after GA).