Skip to content

Commit

Permalink
Make server.port conditionally required on HTTP server semconv (#399)
Browse files Browse the repository at this point in the history
Co-authored-by: Joao Grassi <[email protected]>
Co-authored-by: Alexander Wert <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent d21d653 commit cee22ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ release.
([#387](https://github.com/open-telemetry/semantic-conventions/pull/387))
- Add cardinality warning about two opt-in HTTP metric attributes
([#401](https://github.com/open-telemetry/semantic-conventions/pull/401))
- Change `server.port` from recommended to conditionally required on HTTP server semconv.
([#399](https://github.com/open-telemetry/semantic-conventions/pull/399))

## v1.22.0 (2023-10-12)

Expand Down
2 changes: 1 addition & 1 deletion docs/http/http-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ For an HTTP server span, `SpanKind` MUST be `Server`.
| [`network.peer.address`](../general/attributes.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended |
| [`network.peer.port`](../general/attributes.md) | int | Peer port number of the network connection. | `65123` | Recommended |
| [`server.address`](../general/attributes.md) | string | Name of the local HTTP server that received the request. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended |
| [`server.port`](../general/attributes.md) | int | Port of the local HTTP server that received the request. [5] | `80`; `8080`; `443` | Recommended: [6] |
| [`server.port`](../general/attributes.md) | int | Port of the local HTTP server that received the request. [5] | `80`; `8080`; `443` | Conditionally Required: [6] |
| [`url.path`](../url/url.md) | string | The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component [7] | `/search` | Required |
| [`url.query`](../url/url.md) | string | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component [8] | `q=OpenTelemetry` | Conditionally Required: If and only if one was received/sent. |
| [`url.scheme`](../url/url.md) | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | Required |
Expand Down
2 changes: 1 addition & 1 deletion model/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ groups:
if it's sent in absolute-form.
- Port identifier of the `Host` header
requirement_level:
recommended: If not default (`80` for `http` scheme, `443` for `https`).
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
- ref: url.scheme
requirement_level: required
examples: ["http", "https"]

0 comments on commit cee22ec

Please sign in to comment.