-
Notifications
You must be signed in to change notification settings - Fork 621
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
Pyramid: Capture custom request/response headers #1022
Pyramid: Capture custom request/response headers #1022
Conversation
Can someone re-run the failing builds? |
...opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
Show resolved
Hide resolved
I have some small questions.
|
@lzchen Example, in case a user sends a request with |
In 31 March SIG meet discussion it is decided to document the above mentioned behaviour as an example in instrumentation docs and also add a recommended way to configure these environment variables for each instrumentation. |
will extract ``content-type`` and ``custom_response_header`` from response headers and add them as span attributes. | ||
|
||
It is recommended that you should give the correct names of the headers to be captured in the environment variable. | ||
Response header names captured in pyramid are case insensitive. So, giving header name as ``CUStomHeader`` in environment variable will be able capture header with name ``customheader``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request and response headers we get are different so, I have to give separate behaviour examples for request and response headers as the headers.
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
Show resolved
Hide resolved
@ashu658 fix conflicts and address the unresolved comments. |
Description
This PR implements the HTTP request/response headers as span attributes semantic convention for pyramid framework.
Fixes #914
Type of change
How Has This Been Tested?
Added unit tests for the changes. Also, tested by capturing headers manually with instrumented pyramid app and observing the output on jaeger backend.
Added unit test for non-recording span.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.