Adding environment variables for Http headers #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Add environment variables to be configured for capturing http headers.
This spec describes how to capture the http request/response header and add them in the span. It does not specify the environment variables need to be configured to capture the headers. This change specifies these environment variables.
Env vars proposed in the PR are already supported in Java and Python sdks.
Related PR: open-telemetry#1898
Additional info:
One thing that I have seen in python is that headers provided by some frameworks/libraries (e.g. wsgi based frameworks like flask) are lowercase and
-
is replaced with_
which would mean user who configuresOTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST="CusTOM_HEAder-1"
will be able to capture
custom-header-1
from request headers for some frameworks/libraries whereas for some other frameworks he won't be able to capture this header as it does not change-
to_
.(All python frameworks/libraries I saw provides case-insensitive headers but only some of them replace
-
with_
)Mentioning this info here as I am not sure if it might affect this spec or not.