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

Should http.scheme be renamed to uri.scheme? #2489

Closed
reyang opened this issue Apr 12, 2022 · 9 comments
Closed

Should http.scheme be renamed to uri.scheme? #2489

reyang opened this issue Apr 12, 2022 · 9 comments
Assignees
Labels
area:semantic-conventions Related to semantic conventions

Comments

@reyang
Copy link
Member

reyang commented Apr 12, 2022

Strictly speaking scheme is not an HTTP concept.

https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

@reyang reyang added the area:semantic-conventions Related to semantic conventions label Apr 12, 2022
@Oberon00
Copy link
Member

This would be the kind of the opposite direction of #2056, wouldn't it? I could imagine renaming to http.url_scheme (or http.uri_scheme) but I don't think there is a real problem with the current name that warrants the disruption caused by renaming (even though it is eased by the convention schema mechanism).

@reyang
Copy link
Member Author

reyang commented Apr 13, 2022

FYI this is the ECS approach: https://www.elastic.co/guide/en/ecs/current/ecs-http.html#ecs-http

Use the url field set to store the url of the request.

@trask trask assigned denisivan0v and unassigned jmacd Jan 30, 2023
@trask
Copy link
Member

trask commented Jan 31, 2023

if we rename http.scheme to url.scheme, would we also rename http.url to url.full?

and (maybe) rename http.target to url.target, or (aligning with ECS) split http.target into url.path + url.query + url.fragment?

@trask
Copy link
Member

trask commented Jan 31, 2023

cc @AlexanderWert

@reyang
Copy link
Member Author

reyang commented Jan 31, 2023

I think this is where we should borrow/learn from ECS, and maybe @AlexanderWert can help us a lot.

I will give an example which shows how we end up with if we call it http.url:

  1. A vendor is building an anti-virus software which records all the outgoing networking access, and for L7 actions, the software supports both FTP and HTTP.
  2. The vendor would want to have a table which looks like:
    | timestamp | user   | url.full              | blocked |
    | --------- | ------ | --------------------- | ------- |
    | T1        | reiley | http://wikipedia.org/ | no      |
    | T2        | reiley | http://microsoft.com/ | no      |
    | T3        | reiley | ftp://bad/malware     | yes     |
    
  3. If we ask folks to use http.url and ftp.url, they will either end up with a sparse table that is hard to use, or they have to put things to different tables, or they will push for a new major version of semantic convention.

@trask
Copy link
Member

trask commented Jan 31, 2023

http.client_ip -> net.client_ip or net.forwarded_ip similar to ECS network.forwarded_ip?

@AlexanderWert
Copy link
Member

AlexanderWert commented Feb 1, 2023

To provide some input from the ECS perspective to this:

Being more explicit about all the URL-related aspects and group them under a common namespace would allow to address the examples mentioned here and would also address #2056

So basically:

  • http.url -> url.original (+ optional and where applicable: url.full, url.scheme, url.domain, url.port, url.path, url.query, etc. )
  • http.scheme -> url.scheme
  • http.target -> url.original (+ optional and where applicable: url.path, url.query) -> addresses Replace http.target with http.path and http.query? #2056

Also, is it necessary to have different attributes for http.url (on CLIENT spans) and http.target (on SERVER spans)? Both are representing (parts of a) URL and with the SpanKind the semantics (client request URL vs server request target) of it is also clearly defined. So, why not using a common attribute (or a set of attributes) for it?

@trask
Copy link
Member

trask commented Feb 2, 2023

let's move this conversation over to #3163 if no objections

@trask
Copy link
Member

trask commented Feb 3, 2023

@reyang ok to close this in favor of the #3163?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions
Projects
Development

No branches or pull requests

6 participants