Skip to content
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

Add http.client_scheme #3179

Closed
wants to merge 2 commits into from
Closed

Conversation

trask
Copy link
Member

@trask trask commented Feb 6, 2023

Keeping as draft for now to discuss http.client_ip vs http.forwarded_ip in HTTP semconv stability WG.

Fixes #2338

Changes

Add new http attribute http.client_scheme to capture original client scheme, e.g. when using SSL-terminating web server in front of application.

brief: >
The http scheme of the original client behind all proxies, if
known (e.g. from [X-Forwarded-Proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto)
or [Forwarded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I wrote in the issue, this attribute will require the instrumentations to parse the header and extract the protocol from it to store.

In addition, it will create duplication of the value if the user is also recording the headers.

As this can also be done later in the pipeline, I suggest considering the use of http.request.header.x-forwarded-proto / http.request.header.forwarded which is an existing attribute that records the relevant information (or allow instrumentation to set either one of these attributes).

@trask
Copy link
Member Author

trask commented Feb 14, 2023

Closing this in favor of a future PR that incorporates the ideas from @lmolkova's #2338 (comment)

@trask trask closed this Feb 14, 2023
@trask trask deleted the add-http-client-scheme branch February 14, 2023 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it ok for http.scheme to factor in forwarded "proto" field / x-forwarded-proto headers?
2 participants