-
Notifications
You must be signed in to change notification settings - Fork 626
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
Capture HTTP request/response headers as span attributes #906
Comments
It would be ideal if we could have same env vars for all Otel SDKs. Does the spec recommend anything? |
Sure we can have the same env vars for all SDKs. We might want to keep the prefix 'OTEL' to distinguish that these env vars are used by otel sdks.
No, the spec doesn’t recommend anything. I see you have already asked for the specifications of env vars here but I don't think there has been further discussion around that. |
I think we can go ahead with |
sure :) |
Found that Java SIG is using language independent environment variables. Otel-Java-Env-Vars |
As part of this work, we should add an example of this usage for each instrumentation under |
Raised a PR proposing env vars open-telemetry/opentelemetry-specification#2461. Please have a look. |
Created #1023 for adding docstrings for instrumentations where changes are already merged. |
@ashu658 Can be this be closed now? |
Yes @srikanthccv it can be closed. |
Is your feature request related to a problem?
Python agent is not able to capture custom headers as of now. The specifications for capturing request/response headers is defined here http-request-response-header
Describe the solution you'd like
This feature aims to capture custom request/response headers with the help of environment variables.I think these environment variables should be same for all the frameworks (something like OTEL_PYTHON_CAPTURE_REQUEST_HEADERS, OTEL_PYTHON_CAPTURE_RESPONSE_HEADERS) and the request/response headers will only be added in case of a server span.
Currently, some frameworks like falcon and django captures custom request headers with the help of environment variables (i.e. OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS etc). I suggest we should change the environment variable from being framework specific to be general for all the frameworks.
We can open multiple sub-issues to add support and test cases for each framework.
Additional context
With conditional server span creation #445 added we can ensure single server span creation and no two frameworks capturing the same headers.
The text was updated successfully, but these errors were encountered: