Skip to content

Commit

Permalink
Remove conditional requirement on network.peer.address and `network…
Browse files Browse the repository at this point in the history
….peer.port` (#449)

Co-authored-by: Joao Grassi <joao.grassi@dynatrace.com>
  • Loading branch information
trask and joaopgrassi authored Oct 30, 2023
1 parent a3bec5e commit 3070635
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ release.
([#409](https://github.com/open-telemetry/semantic-conventions/pull/409))
- Remove `url.path` default value.
([#462](https://github.com/open-telemetry/semantic-conventions/pull/462))
- Remove conditional requirement on `network.peer.address` and `network.peer.port`
([#449](https://github.com/open-telemetry/semantic-conventions/pull/449))

### Features

Expand Down
2 changes: 1 addition & 1 deletion docs/database/database-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Some database systems may allow a connection to switch to a different `db.user`,
| `db.connection_string` | string | The connection string used to connect to the database. It is recommended to remove embedded credentials. | `Server=(localdb)\v11.0;Integrated Security=true;` | Recommended |
| `db.system` | string | An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. | `other_sql` | Required |
| `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | Recommended |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `server.address`. |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `udp` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | Recommended |
Expand Down
6 changes: 2 additions & 4 deletions docs/http/http-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ sections below.
| [`http.response.body.size`](../attributes-registry/http.md) | int | The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. | `3495` | Recommended |
| [`http.response.header.<key>`](../attributes-registry/http.md) | string[] | HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values. [5] | `http.response.header.content-type=["application/json"]`; `http.response.header.my-custom-header=["abc", "def"]` | Opt-In |
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [6] | `http`; `spdy` | Opt-In |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [7] | `1.0`; `1.1`; `2`; `3` | Recommended |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8] | `tcp`; `udp` | Opt-In |
Expand Down Expand Up @@ -232,8 +234,6 @@ For an HTTP client span, `SpanKind` MUST be `Client`.
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`http.request.resend_count`](../attributes-registry/http.md) | int | The ordinal number of request resending attempt (for any reason, including redirects). [1] | `3` | Recommended: if and only if request was retried. |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `server.address`. |
| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`server.address`](../general/attributes.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
| [`server.port`](../general/attributes.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [3] | `80`; `8080`; `443` | Conditionally Required: [4] |
| [`url.full`](../attributes-registry/url.md) | string | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) [5] | `https://www.foo.bar/search?q=OpenTelemetry#SemConv`; `//localhost` | Required |
Expand Down Expand Up @@ -347,8 +347,6 @@ For an HTTP server span, `SpanKind` MUST be `Server`.
| [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [3] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
| [`network.local.address`](../attributes-registry/network.md) | string | Local socket address. Useful in case of a multi-IP host. | `10.1.2.80`; `/tmp/my.sock` | Opt-In |
| [`network.local.port`](../attributes-registry/network.md) | int | Local socket port. Useful in case of a multi-port host. | `65123` | Opt-In |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.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` | Conditionally Required: [6] |
| [`url.path`](../attributes-registry/url.md) | string | The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component | `/search` | Required |
Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ The following operations related to messages are defined for these semantic conv
| `messaging.message.id` | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | Recommended: [14] |
| `messaging.operation` | string | A string identifying the kind of messaging operation as defined in the [Operation names](#operation-names) section above. [15] | `publish` | Required |
| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq`; `AmazonSQS` | Required |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `server.address`. |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [16] | `amqp`; `mqtt` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [17] | `3.1.1` | Recommended |
Expand Down
4 changes: 2 additions & 2 deletions docs/rpc/rpc-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service
<!-- semconv rpc.client -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `server.address`. |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
<!-- endsemconv -->

Expand All @@ -169,7 +169,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service
|---|---|---|---|---|
| [`client.address`](../general/attributes.md) | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [1] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended |
| [`client.port`](../general/attributes.md) | int | Client port number. [2] | `65123` | Recommended |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended: If different than `client.address`. |
| [`network.peer.address`](../attributes-registry/network.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`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [3] | `tcp`; `udp` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [4] | `ipv4`; `ipv6` | Recommended |
Expand Down
2 changes: 0 additions & 2 deletions model/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ groups:
requirement_level:
conditionally_required: If using a port other than the default port for this DBMS and if `server.address` is set.
- ref: network.peer.address
requirement_level:
recommended: If different than `server.address`.
tag: connection-level
- ref: network.peer.port
requirement_level:
Expand Down
12 changes: 4 additions & 8 deletions model/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ groups:
- ref: http.request.method
sampling_relevant: true
requirement_level: required
- ref: network.peer.address
- ref: network.peer.port
requirement_level:
recommended: If `network.peer.address` is set.
- ref: network.transport
requirement_level: opt_in
note: >
Expand All @@ -39,12 +43,6 @@ groups:
sampling_relevant: true
- ref: server.port
sampling_relevant: true
- ref: network.peer.address
requirement_level:
recommended: If different than `server.address`.
- ref: network.peer.port
requirement_level:
recommended: If `network.peer.address` is set.
- ref: url.full
sampling_relevant: true
requirement_level: required
Expand Down Expand Up @@ -78,8 +76,6 @@ groups:
The port of the original client behind all proxies, if
known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded) or a similar header).
Otherwise, the immediate client peer port.
- ref: network.peer.address
- ref: network.peer.port
- ref: url.path
requirement_level: required
sampling_relevant: true
Expand Down
2 changes: 0 additions & 2 deletions model/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ groups:
requirement_level:
conditionally_required: If available.
- ref: network.peer.address
requirement_level:
recommended: If different than `server.address`.
tag: connection-level
- ref: network.peer.port
requirement_level:
Expand Down
4 changes: 0 additions & 4 deletions model/trace/rpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ groups:
extends: rpc
attributes:
- ref: network.peer.address
requirement_level:
recommended: If different than `server.address`.
- ref: network.peer.port
requirement_level:
recommended: If `network.peer.address` is set.
Expand All @@ -44,8 +42,6 @@ groups:
- ref: client.address
- ref: client.port
- ref: network.peer.address
requirement_level:
recommended: If different than `client.address`.
- ref: network.peer.port
requirement_level:
recommended: If `network.peer.address` is set.
Expand Down

0 comments on commit 3070635

Please sign in to comment.