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

add optional getAll method to propagation api #1458

Closed
brettmc opened this issue Dec 16, 2024 · 0 comments
Closed

add optional getAll method to propagation api #1458

brettmc opened this issue Dec 16, 2024 · 0 comments
Labels
breaking A breaking change enhancement New feature or request help wanted This issue is looking for someone to work on it

Comments

@brettmc
Copy link
Collaborator

brettmc commented Dec 16, 2024

Implement open-telemetry/opentelemetry-specification#4295 which was added to spec 1.40.0:

Adds optional GetAll method to Getter in Propagation API, allowing for the retrieval of multiple values for the same key.

The spec further suggests that the implementation should be non-breaking if possible. Java adds an ExtendedPropagationGetterInterface which can optionally be implemented by propagators.

edit:
It looks like getAll is designed to handle repeated headers, and specifically calls out that baggage could appear multiple times in an HTTP request. However, RFC-2730 s3.3.2 says that:

A recipient MAY combine multiple header fields with the same field
name into one "field-name: field-value" pair, without changing the
semantics of the message, by appending each subsequent field value to
the combined field value in order, separated by a comma.

nyholm/psr7 certainly merges the headers per RFC: https://github.com/Nyholm/psr7/blob/1.8.2/tests/RequestTest.php#L186
Based on that, I think that there is nothing to do here since our implementation already meets the objectives of getAll.

@brettmc brettmc added enhancement New feature or request help wanted This issue is looking for someone to work on it labels Dec 16, 2024
@brettmc brettmc added the breaking A breaking change label Jan 6, 2025
@brettmc brettmc closed this as completed Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change enhancement New feature or request help wanted This issue is looking for someone to work on it
Projects
None yet
Development

No branches or pull requests

1 participant