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