Skip to content

Commit a45beec

Browse files
committed
network.peer.* / network.local.*
1 parent 41f6f1f commit a45beec

File tree

16 files changed

+141
-168
lines changed

16 files changed

+141
-168
lines changed

docs/database/database-spans.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,19 @@ 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.server.address`](../general/attributes.md) | string | Server address of the (physical) network connection - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock`; `proxy.example.com` | Recommended: If different than `server.address`. |
71-
| [`network.server.ip`](../general/attributes.md) | string | Server IP address of the (physical) network connection. | `10.1.2.80` | Recommended: If different than `network.server.address`. |
72-
| [`network.server.port`](../general/attributes.md) | int | Server port number of the (physical) network connection. | `65123` | Recommended: [2] |
70+
| [`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: If different than `server.address`. |
71+
| [`network.peer.port`](../general/attributes.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
7372
| [`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. | `tcp`; `udp` | Recommended |
7473
| [`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 |
75-
| [`server.address`](../general/attributes.md) | string | Name of the database host. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: See alternative attributes below. |
76-
| [`server.port`](../general/attributes.md) | int | Server port number. [4] | `80`; `8080`; `443` | Conditionally Required: [5] |
74+
| [`server.address`](../general/attributes.md) | string | Name of the database host. [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: See alternative attributes below. |
75+
| [`server.port`](../general/attributes.md) | int | Server port number. [2] | `80`; `8080`; `443` | Conditionally Required: [3] |
7776

78-
**[1]:** Typically an IP address or Unix domain socket name, but can be domain name if available without reverse DNS lookup.
79-
80-
**[2]:** If different than `server.port` and if `network.server.address` is set.
81-
82-
**[3]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent
77+
**[1]:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent
8378
the server address behind any intermediaries (e.g. proxies) if it's available.
8479

85-
**[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.
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.
8681

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

8984
`db.system` 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.
9085

docs/general/attributes.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,13 @@ if they do not cause breaking changes to HTTP semantic conventions.
170170
| `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 |
171171
| `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 |
172172
| `network.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended |
173-
| `network.client.address` | string | Client address of the (physical) network connection - IP address or Unix domain socket name. | `/tmp/my.sock`; `10.1.2.80` | Recommended: If different than `client.address`. |
174-
| `network.client.port` | int | Client port number of the (physical) network connection. | `65123` | Recommended: [2] |
175-
| `network.server.address` | string | Server address of the (physical) network connection - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock`; `proxy.example.com` | Recommended: If different than `server.address`. |
176-
| `network.server.port` | int | Server port number of the (physical) network connection. | `65123` | Recommended: [4] |
177-
| `network.server.ip` | string | Server IP address of the (physical) network connection. | `10.1.2.80` | Recommended: If different than `network.server.address`. |
173+
| `network.peer.address` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended |
174+
| `network.peer.port` | int | Peer port number of the network connection. | `65123` | Recommended |
175+
| `network.local.address` | string | Local address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended |
176+
| `network.local.port` | int | Local port number of the network connection. | `65123` | Recommended |
178177

179178
**[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`.
180179

181-
**[2]:** If different than `client.port` and if `network.client.address` is set.
182-
183-
**[3]:** Typically an IP address or Unix domain socket name, but can be domain name if available without reverse DNS lookup.
184-
185-
**[4]:** If different than `server.port` and if `network.server.address` is set.
186-
187180
`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.
188181

189182
| Value | Description |

docs/http/http-metrics.md

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,11 @@ of `[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5,
459459
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `name_resolution_error`; `500` | Conditionally Required: If request has ended with an error. |
460460
| `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
461461
| `http.response.status_code` | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
462+
| [`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: If different than `server.address`. |
462463
| [`network.protocol.name`](../general/attributes.md) | 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 |
463464
| [`network.protocol.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [3] | `3.1.1` | Recommended |
464-
| [`network.server.address`](../general/attributes.md) | string | Server address of the (physical) network connection - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock`; `proxy.example.com` | Recommended: If different than `server.address`. |
465-
| [`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. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
466-
| [`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. [6] | `80`; `8080`; `443` | Conditionally Required: [7] |
465+
| [`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. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
466+
| [`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. [5] | `80`; `8080`; `443` | Conditionally Required: [6] |
467467

468468
**[1]:** If the request fails with an error before response status code was sent or received,
469469
`error.type` SHOULD be set to exception type or a component-specific low cardinality error code.
@@ -498,19 +498,17 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
498498

499499
**[3]:** `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`.
500500

501-
**[4]:** Typically an IP address or Unix domain socket name, but can be domain name if available without reverse DNS lookup.
502-
503-
**[5]:** Determined by using the first of the following that applies
501+
**[4]:** Determined by using the first of the following that applies
504502

505503
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
506504
if it's sent in absolute-form
507505
- Host identifier of the `Host` header
508506

509507
SHOULD NOT be set if capturing it would require an extra DNS lookup.
510508

511-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
509+
**[5]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
512510

513-
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
511+
**[6]:** If not default (`80` for `http` scheme, `443` for `https`).
514512

515513
`error.type` 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.
516514

@@ -554,11 +552,11 @@ This metric is optional.
554552
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `name_resolution_error`; `500` | Conditionally Required: If request has ended with an error. |
555553
| `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
556554
| `http.response.status_code` | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
555+
| [`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: If different than `server.address`. |
557556
| [`network.protocol.name`](../general/attributes.md) | 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 |
558557
| [`network.protocol.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [3] | `3.1.1` | Recommended |
559-
| [`network.server.address`](../general/attributes.md) | string | Server address of the (physical) network connection - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock`; `proxy.example.com` | Recommended: If different than `server.address`. |
560-
| [`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. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
561-
| [`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. [6] | `80`; `8080`; `443` | Conditionally Required: [7] |
558+
| [`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. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
559+
| [`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. [5] | `80`; `8080`; `443` | Conditionally Required: [6] |
562560

563561
**[1]:** If the request fails with an error before response status code was sent or received,
564562
`error.type` SHOULD be set to exception type or a component-specific low cardinality error code.
@@ -593,19 +591,17 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
593591

594592
**[3]:** `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`.
595593

596-
**[4]:** Typically an IP address or Unix domain socket name, but can be domain name if available without reverse DNS lookup.
597-
598-
**[5]:** Determined by using the first of the following that applies
594+
**[4]:** Determined by using the first of the following that applies
599595

600596
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
601597
if it's sent in absolute-form
602598
- Host identifier of the `Host` header
603599

604600
SHOULD NOT be set if capturing it would require an extra DNS lookup.
605601

606-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
602+
**[5]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
607603

608-
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
604+
**[6]:** If not default (`80` for `http` scheme, `443` for `https`).
609605

610606
`error.type` 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.
611607

@@ -649,11 +645,11 @@ This metric is optional.
649645
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `name_resolution_error`; `500` | Conditionally Required: If request has ended with an error. |
650646
| `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
651647
| `http.response.status_code` | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
648+
| [`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: If different than `server.address`. |
652649
| [`network.protocol.name`](../general/attributes.md) | 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 |
653650
| [`network.protocol.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [3] | `3.1.1` | Recommended |
654-
| [`network.server.address`](../general/attributes.md) | string | Server address of the (physical) network connection - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock`; `proxy.example.com` | Recommended: If different than `server.address`. |
655-
| [`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. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
656-
| [`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. [6] | `80`; `8080`; `443` | Conditionally Required: [7] |
651+
| [`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. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Required |
652+
| [`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. [5] | `80`; `8080`; `443` | Conditionally Required: [6] |
657653

658654
**[1]:** If the request fails with an error before response status code was sent or received,
659655
`error.type` SHOULD be set to exception type or a component-specific low cardinality error code.
@@ -688,19 +684,17 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
688684

689685
**[3]:** `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`.
690686

691-
**[4]:** Typically an IP address or Unix domain socket name, but can be domain name if available without reverse DNS lookup.
692-
693-
**[5]:** Determined by using the first of the following that applies
687+
**[4]:** Determined by using the first of the following that applies
694688

695689
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
696690
if it's sent in absolute-form
697691
- Host identifier of the `Host` header
698692

699693
SHOULD NOT be set if capturing it would require an extra DNS lookup.
700694

701-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
695+
**[5]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
702696

703-
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
697+
**[6]:** If not default (`80` for `http` scheme, `443` for `https`).
704698

705699
`error.type` 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.
706700

0 commit comments

Comments
 (0)