Skip to content

Commit 3286326

Browse files
authored
Improve network briefs (open-telemetry#352)
1 parent 5628684 commit 3286326

File tree

10 files changed

+197
-115
lines changed

10 files changed

+197
-115
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ release.
127127
([#357](https://github.com/open-telemetry/semantic-conventions/pull/357))
128128
- BREAKING: Remove `server.socket.address` from HTTP and RPC client metrics.
129129
([#350](https://github.com/open-telemetry/semantic-conventions/pull/350))
130+
- Improve network attribute briefs.
131+
([#352](https://github.com/open-telemetry/semantic-conventions/pull/352))
130132

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

Diff for: docs/database/database-spans.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,32 @@ Some database systems may allow a connection to switch to a different `db.user`,
6767
| `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 |
6868
| `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 |
6969
| `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | Recommended |
70-
| [`network.transport`](../general/attributes.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). The value SHOULD be normalized to lowercase. Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport, for example different processes could be listening on TCP port 12345 and UDP port 12345. | `tcp`; `udp` | Recommended |
71-
| [`network.type`](../general/attributes.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `ipv4`; `ipv6` | Recommended |
72-
| [`server.address`](../general/attributes.md) | string | Name of the database host. [1] | `example.com` | Conditionally Required: See alternative attributes below. |
73-
| [`server.port`](../general/attributes.md) | int | Server port number [2] | `80`; `8080`; `443` | Conditionally Required: [3] |
74-
| [`server.socket.address`](../general/attributes.md) | string | Server address of the socket connection - IP address or Unix domain socket name. [4] | `10.5.3.2` | See below |
75-
| [`server.socket.port`](../general/attributes.md) | int | Server port number of the socket connection. [5] | `16456` | Recommended: If different than `server.port`. |
76-
77-
**[1]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent
70+
| [`network.transport`](../general/attributes.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://en.wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `udp` | Recommended |
71+
| [`network.type`](../general/attributes.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | Recommended |
72+
| [`server.address`](../general/attributes.md) | string | Name of the database host. [3] | `example.com` | Conditionally Required: See alternative attributes below. |
73+
| [`server.port`](../general/attributes.md) | int | Server port number [4] | `80`; `8080`; `443` | Conditionally Required: [5] |
74+
| [`server.socket.address`](../general/attributes.md) | string | Server address of the socket connection - IP address or Unix domain socket name. [6] | `10.5.3.2` | See below |
75+
| [`server.socket.port`](../general/attributes.md) | int | Server port number of the socket connection. [7] | `16456` | Recommended: If different than `server.port`. |
76+
77+
**[1]:** The value SHOULD be normalized to lowercase.
78+
79+
Consider always setting the transport when setting a port number, since
80+
a port number is ambiguous without knowing the transport, for example
81+
different processes could be listening on TCP port 12345 and UDP port 12345.
82+
83+
**[2]:** The value SHOULD be normalized to lowercase.
84+
85+
**[3]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent
7886
the server address behind any intermediaries (e.g. proxies) if it's available.
7987

80-
**[2]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available.
88+
**[4]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available.
8189

82-
**[3]:** If using a port other than the default port for this DBMS and if `server.address` is set.
90+
**[5]:** If using a port other than the default port for this DBMS and if `server.address` is set.
8391

84-
**[4]:** When observed from the client side, this SHOULD represent the immediate server peer address.
92+
**[6]:** When observed from the client side, this SHOULD represent the immediate server peer address.
8593
When observed from the server side, this SHOULD represent the physical server address.
8694

87-
**[5]:** When observed from the client side, this SHOULD represent the immediate server peer port.
95+
**[7]:** When observed from the client side, this SHOULD represent the immediate server peer port.
8896
When observed from the server side, this SHOULD represent the physical server port.
8997

9098
**Additional attribute requirements:** At least one of the following sets of attributes is required:

Diff for: docs/general/attributes.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,22 @@ if they do not cause breaking changes to HTTP semantic conventions.
233233
<!-- semconv network-core -->
234234
| Attribute | Type | Description | Examples | Requirement Level |
235235
|---|---|---|---|---|
236-
| `network.transport` | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). The value SHOULD be normalized to lowercase. Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport, for example different processes could be listening on TCP port 12345 and UDP port 12345. | `tcp`; `udp` | Recommended |
237-
| `network.type` | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `ipv4`; `ipv6` | Recommended |
238-
| `network.protocol.name` | string | [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended |
239-
| `network.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended |
236+
| `network.transport` | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://en.wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `udp` | Recommended |
237+
| `network.type` | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | Recommended |
238+
| `network.protocol.name` | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [3] | `amqp`; `http`; `mqtt` | Recommended |
239+
| `network.protocol.version` | string | Version of the protocol specified in `network.protocol.name`. [4] | `3.1.1` | Recommended |
240240

241-
**[1]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
241+
**[1]:** The value SHOULD be normalized to lowercase.
242+
243+
Consider always setting the transport when setting a port number, since
244+
a port number is ambiguous without knowing the transport, for example
245+
different processes could be listening on TCP port 12345 and UDP port 12345.
246+
247+
**[2]:** The value SHOULD be normalized to lowercase.
248+
249+
**[3]:** The value SHOULD be normalized to lowercase.
250+
251+
**[4]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
242252

243253
`network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
244254

0 commit comments

Comments
 (0)