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

Preserve multiple HTTP header values as a list instead of a joined string #2360

Closed
aabmass opened this issue Mar 20, 2024 · 2 comments · Fixed by #2361
Closed

Preserve multiple HTTP header values as a list instead of a joined string #2360

aabmass opened this issue Mar 20, 2024 · 2 comments · Fixed by #2361

Comments

@aabmass
Copy link
Member

aabmass commented Mar 20, 2024

Right now, HTTP headers are stored as list type span attribute with one item. If there are repeated headers, they are joined with a comma as (being implemented in #2266). We could instead preserve each header value as a separate string.

Current behavior:

{
  "http.request.header.custom_test_header_1": ("test-header-value-1,test-header-value-2",),
}

Proposed behavior

{
  "http.request.header.custom_test_header_1": ("test-header-value-1", "test-header-value-2"),
}

This may require changing some public signatures or adding new overloads to keep backward compatibility.

@aabmass
Copy link
Member Author

aabmass commented Mar 20, 2024

Somewhat related, a bunch of signatures in ASGI and WSGI instrumentations are already incorrect #2358

@samuelcolvin
Copy link
Contributor

Fix proposed in #2361.

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 a pull request may close this issue.

2 participants