Skip to content
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

Specify allowed characters for Baggage keys and values #3801

Merged
merged 14 commits into from
Feb 22, 2024

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Dec 21, 2023

Changes

  • Add missing spec language on what keys and values are allowed for the baggage.
  • Emphasize case sensitivity
  • Definitions are aligned with W3C Baggage Spec, but provide a distinction between API representation and the wire encoding (done by W3C Propagator)

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested review from a team December 21, 2023 16:53
reyang
reyang previously approved these changes Dec 21, 2023
CHANGELOG.md Show resolved Hide resolved
Co-authored-by: Reiley Yang <reyang@microsoft.com>
@yurishkuro
Copy link
Member Author

Note: this could be a breaking change e.g. for Go SDK (open-telemetry/opentelemetry-go#3685), whose current implementation is wrong imo.

Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Note: this could be a breaking change e.g. for Go SDK (open-telemetry/opentelemetry-go#3685), whose current implementation is wrong imo.

I would say that we chose the wrong decision in OTel Go. Still we might try to fix it in some backwards-compatible way (by extending the API).

TL;DR; For me this is not a blocker for this PR.

specification/baggage/api.md Outdated Show resolved Hide resolved
@pellared
Copy link
Member

I am working towards making a fix in OTel Go: open-telemetry/opentelemetry-go#4804

@jkwatson
Copy link
Contributor

jkwatson commented Jan 7, 2024

Java is also not compliant with this. Currently, we only propagate keys/values that meet this definition, but we allow arbitrary keys for in-memory usage.

specification/baggage/api.md Outdated Show resolved Hide resolved
specification/baggage/api.md Outdated Show resolved Hide resolved
specification/baggage/api.md Outdated Show resolved Hide resolved
specification/baggage/api.md Outdated Show resolved Hide resolved
yurishkuro and others added 3 commits January 10, 2024 20:15
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

@carlosalberto
Copy link
Contributor

I support @pellared comment on different concerns (the in-process API and the inter-process propagation). Maybe we can adjust this PR to only mention that invalid keys MUST NOT be propagated? Then we can spin off a separate issue/PR discussing on Baggage API part.

(Also this would be easy to do as it would align with what some SIGs already do)

Copy link

github-actions bot commented Feb 7, 2024

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 7, 2024
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro
Copy link
Member Author

Updated to allow arbitrary strings in the API, but caution that Propagators may not allow some keys.

specification/baggage/api.md Outdated Show resolved Hide resolved
specification/baggage/api.md Outdated Show resolved Hide resolved
Co-authored-by: Robert Pająk <pellared@hotmail.com>
@yurishkuro
Copy link
Member Author

cc @open-telemetry/go-maintainers - the new wording makes Go implementation non-compliant, but it's not a breaking change for its API, you will just need to relax the checks (i.e. never return errors from baggage.New)

@carlosalberto
Copy link
Contributor

Let's remind maintainers in the call next Monday about this, but otherwise we are fine to go.

@yurishkuro
Copy link
Member Author

@carlosalberto are we good to merge?

@carlosalberto carlosalberto merged commit 3376533 into open-telemetry:main Feb 22, 2024
7 checks passed
@yurishkuro yurishkuro deleted the baggage-values branch February 22, 2024 15:58
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…y#3801)

## Changes

* Add missing spec language on what keys and values are allowed for the
baggage.
* Emphasize case sensitivity
* Definitions are aligned with W3C Baggage Spec, but provide a
distinction between API representation and the wire encoding (done by
W3C Propagator)
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.

10 participants