Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Aug 24, 2023
1 parent 62b4273 commit e041878
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ release.
([#252](https://github.com/open-telemetry/semantic-conventions/pull/252))
- Simplify HTTP metric briefs.
([#276](https://github.com/open-telemetry/semantic-conventions/pull/276))
- Add more ECS url fields.
([#181](https://github.com/open-telemetry/semantic-conventions/pull/181))

## v1.21.0 (2023-07-13)

Expand Down
53 changes: 41 additions & 12 deletions docs/url/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,53 @@ This document defines semantic conventions that describe URL and its components.
| `url.query` | string | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component [3] | `q=OpenTelemetry` | Recommended |
| `url.fragment` | string | The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component | `SemConv` | Recommended |
| `url.registered_domain` | string | The highest registered url domain, stripped of the subdomain.

For example, the registered domain for "foo.example.com" is "example.com".
This value can be determined precisely with a list like the public suffix list (`http://publicsuffix.org`). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". | `example.com` | Opt-In |
| `url.subdomain` | string | The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
For example the subdomain portion of `www.east.mydomain.co.uk` is "east". If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain "sub2.sub1", with no trailing period. | `east` | Opt-In |
| `url.top_level_domain` | string | The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
This value can be determined precisely with a list like the public suffix list (`http://publicsuffix.org`). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as `co.uk`. | `co.uk` | Opt-In |

This value can be determined precisely with a list like the public suffix
list (`http://publicsuffix.org`). Trying to approximate this by simply taking
the last two labels will not work well for TLDs such as "co.uk". | `example.com` | Opt-In |
| `url.subdomain` | string | The subdomain portion of a fully qualified domain name includes all of
the names except the host name under the registered_domain. In a partially
qualified domain, or if the the qualification level of the full name cannot
be determined, subdomain contains all of the names below the registered domain.

For example the subdomain portion of `www.east.mydomain.co.uk` is "east".
If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`,
the subdomain field should contain "sub2.sub1", with no trailing period. | `east` | Opt-In |
| `url.top_level_domain` | string | The effective top level domain (eTLD), also known as the domain suffix,
is the last part of the domain name. For example, the top level domain
for example.com is "com".

This value can be determined precisely with a list like the public suffix list
(`http://publicsuffix.org`). Trying to approximate this by simply taking the last
label will not work well for effective TLDs such as `co.uk`. | `co.uk` | Opt-In |
| `url.username` | string | Username of the request. | `user42` | Opt-In |
| `url.password` | string | Password of the request. | `changeme` | Opt-In |
| `url.extension` | string | The field contains the file extension from the original request url, excluding the leading dot.
The file extension is only set if it exists, as not every url has a file extension.
The leading period must not be included. For example, the value must be "png", not ".png".
Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). | `png` | Opt-In |
| `url.extension` | string | The field contains the file extension from the original request url,
excluding the leading dot.

The file extension is only set if it exists, as not every url has
a file extension.

The leading period must not be included. For example, the value must
be "png", not ".png".

Note that when the file name has multiple extensions (example.tar.gz),
only the last one should be captured ("gz", not "tar.gz"). | `png` | Opt-In |
| `url.domain` | string | Domain of the url, such as `www.opentelemetry.io`.
In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the domain field.
If the URL contains a literal IPv6 address enclosed by [ and ] (IETF RFC 2732), the [ and ] characters should also be captured in the domain field. | `www.opentelemetry.io` | Opt-In |

In some cases a URL may refer to an IP and/or port directly,
without a domain name. In this case, the IP address would go to the domain field.

If the URL contains a literal IPv6 address enclosed by [ and ] (IETF RFC 2732),
the [ and ] characters should also be captured in the domain field. | `www.opentelemetry.io` | Opt-In |
| `url.port` | int | Port of the request | `9090` | Opt-In |
| `url.original` | string | Unmodified original URL as seen in the event source.
Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path.

Note that in network monitoring, the observed URL may be
a full URL, whereas in access logs, the URL is often just represented as a path.

This field is meant to represent the URL as it was observed, complete or not. | `https://www.opentelemetry.io/search/?q=container` | Opt-In |

**[1]:** For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.
Expand Down
12 changes: 6 additions & 6 deletions model/url.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ groups:
- id: registered_domain
requirement_level: opt_in
type: string
brief: >
brief: |
The highest registered url domain, stripped of the subdomain.
For example, the registered domain for "foo.example.com" is "example.com".
Expand All @@ -52,7 +52,7 @@ groups:
- id: subdomain
requirement_level: opt_in
type: string
brief: >
brief: |
The subdomain portion of a fully qualified domain name includes all of
the names except the host name under the registered_domain. In a partially
qualified domain, or if the the qualification level of the full name cannot
Expand All @@ -65,7 +65,7 @@ groups:
- id: top_level_domain
requirement_level: opt_in
type: string
brief: >
brief: |
The effective top level domain (eTLD), also known as the domain suffix,
is the last part of the domain name. For example, the top level domain
for example.com is "com".
Expand All @@ -87,7 +87,7 @@ groups:
- id: extension
requirement_level: opt_in
type: string
brief: >
brief: |
The field contains the file extension from the original request url,
excluding the leading dot.
Expand All @@ -103,7 +103,7 @@ groups:
- id: domain
requirement_level: opt_in
type: string
brief: >
brief: |
Domain of the url, such as `www.opentelemetry.io`.
In some cases a URL may refer to an IP and/or port directly,
Expand All @@ -120,7 +120,7 @@ groups:
- id: original
requirement_level: opt_in
type: string
brief: >
brief: |
Unmodified original URL as seen in the event source.
Note that in network monitoring, the observed URL may be
Expand Down

0 comments on commit e041878

Please sign in to comment.