Skip to content

API to collect custom headers from request and response object are not consistent in ASGI and WSGI frameworks #1025

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

Closed
sanketmehta28 opened this issue Mar 31, 2022 · 0 comments · Fixed by #1064
Assignees
Labels
bug Something isn't working

Comments

@sanketmehta28
Copy link
Member

sanketmehta28 commented Mar 31, 2022

In WSGI instrumentation, api add_custom_request_headers, it is not in sync with api collect_custom_request_header_attributes.

In WSGI, it collect the headers and add them to span in a single function where in ASGI, it only collect the headers from request object and return.
It will make more sense to collect headers from request object and return them rather than adding them to span in the same function as it will make that function more independent of the span.

Same behavior is expected for response headers as well.

What is the expected behavior?

  • add_custom_request_headers/add_custom_response_headers should only collect headers and return rather than adding them to span in the same function
  • Its name should start from collect_***

What is the actual behavior?
It is collecting headers and adding them to span in a single function.

Related to #906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants