From 92f70277ebca237d16ed3b63f08d90ea4f05165b Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 Oct 2023 15:31:02 -0700 Subject: [PATCH 1/5] yaml --- model/trace/database.yaml | 4 ---- model/trace/http.yaml | 4 ---- model/trace/messaging.yaml | 4 ---- model/trace/rpc.yaml | 8 -------- 4 files changed, 20 deletions(-) diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 0f5db8edb7..eff17fd8b7 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -237,12 +237,8 @@ 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: - recommended: If `network.peer.address` is set. tag: connection-level - ref: network.transport tag: connection-level diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 5749f3a6f5..54c2a08273 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -40,11 +40,7 @@ groups: - 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 diff --git a/model/trace/messaging.yaml b/model/trace/messaging.yaml index d2cfab3302..a29722ada1 100644 --- a/model/trace/messaging.yaml +++ b/model/trace/messaging.yaml @@ -174,12 +174,8 @@ 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: - recommended: If `network.peer.address` is set. tag: connection-level - ref: network.transport tag: connection-level diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index 29fa0bf9be..ee81c5f71c 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -29,11 +29,7 @@ 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. - id: rpc.server type: span @@ -44,11 +40,7 @@ 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. - ref: network.transport - ref: network.type From 120782463fc5da7485bd65fefe0ed439c51d3cda Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 Oct 2023 15:31:11 -0700 Subject: [PATCH 2/5] tables --- docs/database/database-spans.md | 4 ++-- docs/http/http-spans.md | 4 ++-- docs/messaging/messaging-spans.md | 4 ++-- docs/rpc/rpc-spans.md | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 65cccffab1..e6737d96b7 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -67,8 +67,8 @@ 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.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | +| [`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 | | [`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 | | [`server.address`](../general/attributes.md) | string | Name of the database host. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended | diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 5791fac6a5..9fd1b4d97f 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -229,8 +229,8 @@ 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. | +| [`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 | 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 | diff --git a/docs/messaging/messaging-spans.md b/docs/messaging/messaging-spans.md index bf70deff59..4e2d9ccf85 100644 --- a/docs/messaging/messaging-spans.md +++ b/docs/messaging/messaging-spans.md @@ -229,8 +229,8 @@ 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.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | +| [`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 | | [`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 | | [`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). [18] | `tcp`; `udp` | Recommended | diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index af881e2114..da22f88f25 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -158,8 +158,8 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | 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.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | +| [`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 attributes @@ -169,8 +169,8 @@ 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.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | +| [`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 | | [`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 | From 5f11930a6b48f44723fdc59bd872014e13418a90 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 Oct 2023 15:38:10 -0700 Subject: [PATCH 3/5] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 527764e4a6..9665e58f89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ release. ([#429](https://github.com/open-telemetry/semantic-conventions/pull/429)) - Use seconds as default duration for FaaS duration histograms ([#384](https://github.com/open-telemetry/semantic-conventions/pull/384)) +- Remove conditional requirement on `network.peer.address` and `network.peer.port` + ([#449](https://github.com/open-telemetry/semantic-conventions/pull/449)) ### Features From 61135a1517b693f56fb5d5c9b9bb0d9f510ed2af Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 26 Oct 2023 08:29:45 -0700 Subject: [PATCH 4/5] less --- docs/database/database-spans.md | 2 +- docs/http/http-spans.md | 2 +- docs/messaging/messaging-spans.md | 2 +- docs/rpc/rpc-spans.md | 4 ++-- model/trace/database.yaml | 2 ++ model/trace/http.yaml | 2 ++ model/trace/messaging.yaml | 2 ++ model/trace/rpc.yaml | 4 ++++ 8 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index e6737d96b7..92678e42c5 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -68,7 +68,7 @@ Some database systems may allow a connection to switch to a different `db.user`, | `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 | -| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | 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 | | [`server.address`](../general/attributes.md) | string | Name of the database host. [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended | diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 26703a7889..f4d448ac55 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -233,7 +233,7 @@ For an HTTP client span, `SpanKind` MUST be `Client`. |---|---|---|---|---| | [`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 | -| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended | +| [`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 | diff --git a/docs/messaging/messaging-spans.md b/docs/messaging/messaging-spans.md index 4e2d9ccf85..009b5ff501 100644 --- a/docs/messaging/messaging-spans.md +++ b/docs/messaging/messaging-spans.md @@ -230,7 +230,7 @@ The following operations related to messages are defined for these semantic conv | `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 | -| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | 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 | | [`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). [18] | `tcp`; `udp` | Recommended | diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md index da22f88f25..3d9e12185c 100644 --- a/docs/rpc/rpc-spans.md +++ b/docs/rpc/rpc-spans.md @@ -159,7 +159,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | 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 | -| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended | +| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. | ### Server attributes @@ -170,7 +170,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 | -| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | 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 | diff --git a/model/trace/database.yaml b/model/trace/database.yaml index eff17fd8b7..7540e58c15 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -239,6 +239,8 @@ groups: - ref: network.peer.address tag: connection-level - ref: network.peer.port + requirement_level: + recommended: If `network.peer.address` is set. tag: connection-level - ref: network.transport tag: connection-level diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 54c2a08273..a1317a4658 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -41,6 +41,8 @@ groups: sampling_relevant: true - ref: network.peer.address - ref: network.peer.port + requirement_level: + recommended: If `network.peer.address` is set. - ref: url.full sampling_relevant: true requirement_level: required diff --git a/model/trace/messaging.yaml b/model/trace/messaging.yaml index a29722ada1..ccad5e1289 100644 --- a/model/trace/messaging.yaml +++ b/model/trace/messaging.yaml @@ -176,6 +176,8 @@ groups: - ref: network.peer.address tag: connection-level - ref: network.peer.port + requirement_level: + recommended: If `network.peer.address` is set. tag: connection-level - ref: network.transport tag: connection-level diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index ee81c5f71c..02a64dbce4 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -30,6 +30,8 @@ groups: attributes: - ref: network.peer.address - ref: network.peer.port + requirement_level: + recommended: If `network.peer.address` is set. - id: rpc.server type: span @@ -41,6 +43,8 @@ groups: - ref: client.port - ref: network.peer.address - ref: network.peer.port + requirement_level: + recommended: If `network.peer.address` is set. - ref: network.transport - ref: network.type From eca110bec1d35ddc4c6687485549431613a7043f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 26 Oct 2023 16:48:05 -0700 Subject: [PATCH 5/5] Move into common attributes --- docs/http/http-spans.md | 6 ++---- model/trace/http.yaml | 10 ++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index f4d448ac55..4e247c1e70 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -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.`](../attributes-registry/http.md) | string[] | HTTP response headers, `` 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 | @@ -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 | -| [`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 | @@ -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 [7] | `/search` | Required | diff --git a/model/trace/http.yaml b/model/trace/http.yaml index a1317a4658..a6b48c28c5 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -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: > @@ -39,10 +43,6 @@ groups: sampling_relevant: true - ref: server.port sampling_relevant: true - - ref: network.peer.address - - ref: network.peer.port - requirement_level: - recommended: If `network.peer.address` is set. - ref: url.full sampling_relevant: true requirement_level: required @@ -76,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