From c7cf92e56e82382ea1b12045d5bd844fbe875f02 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:18:28 -0700 Subject: [PATCH 01/22] schema --- schemas/1.21.0 | 105 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 schemas/1.21.0 diff --git a/schemas/1.21.0 b/schemas/1.21.0 new file mode 100644 index 00000000000..44d68ca15d6 --- /dev/null +++ b/schemas/1.21.0 @@ -0,0 +1,105 @@ +file_format: 1.1.0 +schema_url: https://opentelemetry.io/schemas/1.21.0 +versions: + 1.21.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/9999 + - rename_attributes: + attribute_map: + net.protocol.name: network.protocol.name + net.protocol.version: network.protocol.version + net.transport: network.transport + net.sock.family: network.socket.family + net.host.connection.type: network.host.connection.type + net.host.connection.subtype: network.host.connection.subtype + net.host.carrier.name: network.host.carrier.name + net.host.carrier.mcc: network.host.carrier.mcc + net.host.carrier.mnc: network.host.carrier.mnc + net.host.carrier.icc: network.host.carrier.icc + 1.20.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/3272 + - rename_attributes: + attribute_map: + net.app.protocol.name: net.protocol.name + net.app.protocol.version: net.protocol.version + 1.19.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/3209 + - rename_attributes: + attribute_map: + faas.execution: faas.invocation_id + # https://github.com/open-telemetry/opentelemetry-specification/pull/3188 + - rename_attributes: + attribute_map: + faas.id: cloud.resource_id + # https://github.com/open-telemetry/opentelemetry-specification/pull/3190 + - rename_attributes: + attribute_map: + http.user_agent: user_agent.original + resources: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/3190 + - rename_attributes: + attribute_map: + browser.user_agent: user_agent.original + 1.18.0: + 1.17.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/2957 + - rename_attributes: + attribute_map: + messaging.consumer_id: messaging.consumer.id + messaging.protocol: net.app.protocol.name + messaging.protocol_version: net.app.protocol.version + messaging.destination: messaging.destination.name + messaging.temp_destination: messaging.destination.temporary + messaging.destination_kind: messaging.destination.kind + messaging.message_id: messaging.message.id + messaging.conversation_id: messaging.message.conversation_id + messaging.message_payload_size_bytes: messaging.message.payload_size_bytes + messaging.message_payload_compressed_size_bytes: messaging.message.payload_compressed_size_bytes + messaging.rabbitmq.routing_key: messaging.rabbitmq.destination.routing_key + messaging.kafka.message_key: messaging.kafka.message.key + messaging.kafka.partition: messaging.kafka.destination.partition + messaging.kafka.tombstone: messaging.kafka.message.tombstone + messaging.rocketmq.message_type: messaging.rocketmq.message.type + messaging.rocketmq.message_tag: messaging.rocketmq.message.tag + messaging.rocketmq.message_keys: messaging.rocketmq.message.keys + messaging.kafka.consumer_group: messaging.kafka.consumer.group + 1.16.0: + 1.15.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/2743 + - rename_attributes: + attribute_map: + http.retry_count: http.resend_count + 1.14.0: + 1.13.0: + spans: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/2614 + - rename_attributes: + attribute_map: + net.peer.ip: net.sock.peer.addr + net.host.ip: net.sock.host.addr + 1.12.0: + 1.11.0: + 1.10.0: + 1.9.0: + 1.8.0: + spans: + changes: + - rename_attributes: + attribute_map: + db.cassandra.keyspace: db.name + db.hbase.namespace: db.name + 1.7.0: + 1.6.1: + 1.5.0: + 1.4.0: From 14d35b2c294b7ba615c9d355156dfeadd03a23cf Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:20:50 -0700 Subject: [PATCH 02/22] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1961e9131b6..a7cbd1e4f46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,12 @@ release. ([#3388](https://github.com/open-telemetry/opentelemetry-specification/pull/3388)) - Change http.server.duration and http.client.duration units to seconds ([#3390](https://github.com/open-telemetry/opentelemetry-specification/pull/3390)) +- Rename `net.protocol.*` to `network.protocol.*`, + `net.transport` to `network.transport`, + `net.sock.family` to `network.socket.family`, + `net.host.connection.*` to `network.host.connection.*`, and + `net.host.carrier.*` to `network.host.carrier.*` + ([#9999](https://github.com/open-telemetry/opentelemetry-specification/pull/9999)) ### Compatibility From 761f6206ac610ff89f83c18a05a6ded0c02c58f5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:21:41 -0700 Subject: [PATCH 03/22] Add pr number --- CHANGELOG.md | 2 +- schemas/1.21.0 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7cbd1e4f46..6f1a0a9349c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ release. `net.sock.family` to `network.socket.family`, `net.host.connection.*` to `network.host.connection.*`, and `net.host.carrier.*` to `network.host.carrier.*` - ([#9999](https://github.com/open-telemetry/opentelemetry-specification/pull/9999)) + ([#3426](https://github.com/open-telemetry/opentelemetry-specification/pull/3426)) ### Compatibility diff --git a/schemas/1.21.0 b/schemas/1.21.0 index 44d68ca15d6..671ba21716c 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -4,7 +4,7 @@ versions: 1.21.0: spans: changes: - # https://github.com/open-telemetry/opentelemetry-specification/pull/9999 + # https://github.com/open-telemetry/opentelemetry-specification/pull/3426 - rename_attributes: attribute_map: net.protocol.name: network.protocol.name From 6a5a3faa8b8191cb2fc132dac5028dae9d55f034 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:19:19 -0700 Subject: [PATCH 04/22] renames --- semantic_conventions/http-common.yaml | 4 +- semantic_conventions/metrics/http.yaml | 24 +++++------ semantic_conventions/trace/database.yaml | 4 +- semantic_conventions/trace/general.yaml | 4 +- semantic_conventions/trace/http.yaml | 2 +- semantic_conventions/trace/messaging.yaml | 6 +-- semantic_conventions/trace/rpc.yaml | 6 +-- .../common/attribute-requirement-level.md | 2 +- .../semantic_conventions/http-metrics.md | 36 ++++++++--------- .../semantic_conventions/rpc-metrics.md | 8 ++-- .../trace/semantic_conventions/database.md | 12 +++--- .../trace/semantic_conventions/http.md | 12 +++--- .../trace/semantic_conventions/messaging.md | 14 +++---- .../trace/semantic_conventions/rpc.md | 12 +++--- .../semantic_conventions/span-general.md | 40 +++++++++---------- 15 files changed, 93 insertions(+), 93 deletions(-) diff --git a/semantic_conventions/http-common.yaml b/semantic_conventions/http-common.yaml index faf7ff1ba84..0084a9ec036 100644 --- a/semantic_conventions/http-common.yaml +++ b/semantic_conventions/http-common.yaml @@ -15,11 +15,11 @@ groups: conditionally_required: If and only if one was received/sent. brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).' examples: [200] - - ref: net.protocol.name + - ref: network.protocol.name examples: ['http', 'spdy'] requirement_level: recommended: if not default (`http`). - - ref: net.protocol.version + - ref: network.protocol.version examples: ['1.0', '1.1', '2.0'] - id: attributes.http.client diff --git a/semantic_conventions/metrics/http.yaml b/semantic_conventions/metrics/http.yaml index 7f52514c628..30bb1c98b74 100644 --- a/semantic_conventions/metrics/http.yaml +++ b/semantic_conventions/metrics/http.yaml @@ -10,8 +10,8 @@ groups: # todo (lmolkova) build tools don't populate grandparent attributes - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - id: metric.http.server.active_requests type: metric @@ -62,8 +62,8 @@ groups: # todo (lmolkova) build tools don't populate grandparent attributes - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - id: metric.http.server.response.size type: metric @@ -76,8 +76,8 @@ groups: attributes: - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - id: metric.http.client.duration type: metric @@ -89,8 +89,8 @@ groups: attributes: - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - ref: net.sock.peer.addr - id: metric.http.client.request.size @@ -104,8 +104,8 @@ groups: attributes: - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - ref: net.sock.peer.addr - id: metric.http.client.response.size @@ -119,6 +119,6 @@ groups: attributes: - ref: http.method - ref: http.status_code - - ref: net.protocol.name - - ref: net.protocol.version + - ref: network.protocol.name + - ref: network.protocol.version - ref: net.sock.peer.addr diff --git a/semantic_conventions/trace/database.yaml b/semantic_conventions/trace/database.yaml index 65cda87cf73..a8b60303085 100644 --- a/semantic_conventions/trace/database.yaml +++ b/semantic_conventions/trace/database.yaml @@ -242,12 +242,12 @@ groups: tag: connection-level - ref: net.sock.peer.port tag: connection-level - - ref: net.sock.family + - ref: network.socket.family tag: connection-level - ref: net.sock.peer.name requirement_level: recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set. - - ref: net.transport + - ref: network.transport tag: connection-level requirement_level: conditionally_required: If database type is in-process (`"inproc"`), recommended for other database types. diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 206a5987a3d..915f8d14096 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -37,7 +37,7 @@ groups: brief: 'Version of the application layer protocol used. See note below.' examples: '3.1.1' note: > - `net.protocol.version` refers to the version of the protocol used and might be + `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`. - id: sock.peer.name @@ -75,7 +75,7 @@ groups: conditionally_required: > If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` - if `net.sock.family` is not set. This is to support instrumentations that follow previous versions + if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. brief: > Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. diff --git a/semantic_conventions/trace/http.yaml b/semantic_conventions/trace/http.yaml index e5de352f0f3..42bbabec227 100644 --- a/semantic_conventions/trace/http.yaml +++ b/semantic_conventions/trace/http.yaml @@ -27,7 +27,7 @@ groups: - ref: net.sock.peer.addr - ref: net.sock.peer.port - ref: net.sock.peer.name - - ref: net.sock.family + - ref: network.socket.family examples: ['inet', 'inet6'] - ref: user_agent.original diff --git a/semantic_conventions/trace/messaging.yaml b/semantic_conventions/trace/messaging.yaml index 4b22ee96326..9e5d9d7378c 100644 --- a/semantic_conventions/trace/messaging.yaml +++ b/semantic_conventions/trace/messaging.yaml @@ -143,15 +143,15 @@ groups: tag: connection-level - ref: net.sock.peer.port tag: connection-level - - ref: net.sock.family + - ref: network.socket.family tag: connection-level - ref: net.sock.peer.name tag: connection-level requirement_level: recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set. - - ref: net.protocol.name + - ref: network.protocol.name examples: ['amqp', 'mqtt'] - - ref: net.protocol.version + - ref: network.protocol.version - id: messaging.producer prefix: messaging diff --git a/semantic_conventions/trace/rpc.yaml b/semantic_conventions/trace/rpc.yaml index d79e67d5bf0..447a9a6fb34 100644 --- a/semantic_conventions/trace/rpc.yaml +++ b/semantic_conventions/trace/rpc.yaml @@ -53,7 +53,7 @@ groups: - ref: net.sock.peer.port requirement_level: recommended: If different than `net.peer.port` and if `net.sock.peer.addr` is set. - - ref: net.sock.family + - ref: network.socket.family requirement_level: conditionally_required: If and only if `net.sock.peer.addr` is set. - ref: net.sock.peer.name @@ -70,7 +70,7 @@ groups: - ref: net.peer.port requirement_level: conditionally_required: See below - - ref: net.transport + - ref: network.transport requirement_level: conditionally_required: See below constraints: @@ -88,7 +88,7 @@ groups: - ref: net.host.name - ref: net.sock.host.addr - ref: net.sock.host.port - - ref: net.sock.family + - ref: network.socket.family - id: rpc.grpc prefix: rpc.grpc diff --git a/specification/common/attribute-requirement-level.md b/specification/common/attribute-requirement-level.md index cfbc22b9da2..d5019a1aaf9 100644 --- a/specification/common/attribute-requirement-level.md +++ b/specification/common/attribute-requirement-level.md @@ -34,7 +34,7 @@ For example, Metric attributes that may have high cardinality can only be define A semantic convention that refers to an attribute from another semantic convention MAY modify the requirement level within its own scope. Otherwise, requirement level from the referred semantic convention applies. -For example, [Database semantic convention](../trace/semantic_conventions/database.md) references `net.transport` attribute defined in [General attributes](../trace/semantic_conventions/span-general.md) with `Conditionally Required` level on it. +For example, [Database semantic convention](../trace/semantic_conventions/database.md) references `network.transport` attribute defined in [General attributes](../trace/semantic_conventions/span-general.md) with `Conditionally Required` level on it. ## Required diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index 968b0575494..169c8c93978 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -51,8 +51,8 @@ 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, | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one. @@ -76,7 +76,7 @@ SHOULD NOT be set if only IP address is available and capturing name would requi **[4]:** If not default (`80` for `http` scheme, `443` for `https`). -**[5]:** `net.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`. +**[5]:** `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`. ### Metric: `http.server.active_requests` @@ -136,8 +136,8 @@ This metric is optional. | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one. @@ -161,7 +161,7 @@ SHOULD NOT be set if only IP address is available and capturing name would requi **[4]:** If not default (`80` for `http` scheme, `443` for `https`). -**[5]:** `net.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`. +**[5]:** `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`. ### Metric: `http.server.response.size` @@ -183,8 +183,8 @@ This metric is optional. | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one. @@ -208,7 +208,7 @@ SHOULD NOT be set if only IP address is available and capturing name would requi **[4]:** If not default (`80` for `http` scheme, `443` for `https`). -**[5]:** `net.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`. +**[5]:** `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`. ## HTTP Client @@ -234,8 +234,8 @@ 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, | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -250,7 +250,7 @@ SHOULD NOT be set if capturing it would require an extra DNS lookup. **[3]:** If not default (`80` for `http` scheme, `443` for `https`). -**[4]:** `net.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`. +**[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`. ### Metric: `http.client.request.size` @@ -270,8 +270,8 @@ This metric is optional. | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -286,7 +286,7 @@ SHOULD NOT be set if capturing it would require an extra DNS lookup. **[3]:** If not default (`80` for `http` scheme, `443` for `https`). -**[4]:** `net.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`. +**[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`. ### Metric: `http.client.response.size` @@ -306,8 +306,8 @@ This metric is optional. | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | -| [`net.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| [`net.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -322,5 +322,5 @@ SHOULD NOT be set if capturing it would require an extra DNS lookup. **[3]:** If not default (`80` for `http` scheme, `443` for `https`). -**[4]:** `net.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`. +**[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`. diff --git a/specification/metrics/semantic_conventions/rpc-metrics.md b/specification/metrics/semantic_conventions/rpc-metrics.md index 6508a2af271..850cc188612 100644 --- a/specification/metrics/semantic_conventions/rpc-metrics.md +++ b/specification/metrics/semantic_conventions/rpc-metrics.md @@ -73,11 +73,11 @@ measurements. | [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [2] | `exampleMethod` | Recommended | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [3] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: See below | -| [`net.sock.family`](../../trace/semantic_conventions/span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | +| [`network.socket.family`](../../trace/semantic_conventions/span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | +| [`network.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -111,9 +111,9 @@ To avoid high cardinality, implementations should prefer the most stable of `net For client-side metrics `net.peer.port` is required if the connection is IP-based and the port is available (it describes the server port they are connecting to). For server-side spans `net.peer.port` is optional (it describes the port the client is connecting from). -Furthermore, setting [net.transport][] is required for non-IP connection like named pipe bindings. +Furthermore, setting [network.transport][] is required for non-IP connection like named pipe bindings. -[net.transport]: ../../trace/semantic_conventions/span-general.md#network-transport-attributes +[network.transport]: ../../trace/semantic_conventions/span-general.md#network-transport-attributes ### Service name diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 36bff3d5442..372b974236c 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -46,16 +46,16 @@ Some database systems may allow a connection to switch to a different `db.user`, | `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | Recommended | | [`net.peer.name`](span-general.md) | string | Name of the database host. [1] | `example.com` | Conditionally Required: See alternative attributes below. | | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: [2] | -| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [3] | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [3] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [4] | -| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: [5] | +| [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: [5] | **[1]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. **[2]:** If using a port other than the default port for this DBMS and if `net.peer.name` is set. -**[3]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[3]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[4]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. @@ -285,7 +285,7 @@ In addition to Cosmos DB attributes, all spans include | `net.peer.name` | `"shopdb.example.com"` | | `net.sock.peer.addr` | `"192.0.2.12"` | | `net.peer.port` | `3306` | -| `net.transport` | `"IP.TCP"` | +| `network.transport` | `"IP.TCP"` | | `db.name` | `"ShopDb"` | | `db.statement` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | | `db.operation` | `"SELECT"` | @@ -303,7 +303,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `db.connection_string` | not set | | `db.user` | not set | | `net.peer.name` | `"/tmp/redis.sock"` | -| `net.transport` | `"Unix"` | +| `network.transport` | `"Unix"` | | `db.name` | not set | | `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` | | `db.operation` | not set | @@ -320,7 +320,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `net.peer.name` | `"mongodb0.example.com"` | | `net.sock.peer.addr` | `"192.0.2.14"` | | `net.peer.port` | `27017` | -| `net.transport` | `"IP.TCP"` | +| `network.transport` | `"IP.TCP"` | | `db.name` | `"shopDb"` | | `db.statement` | not set | | `db.operation` | `"findAndModify"` | diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index dba45b01b57..9286b2ff78a 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -69,17 +69,17 @@ sections below. | `http.request_content_length` | int | The size of the request 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_content_length` | 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.method` | string | HTTP request method. | `GET`; `POST`; `HEAD` | Required | -| [`net.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | -| [`net.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [1] | `1.0`; `1.1`; `2.0` | Recommended | -| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [2] | +| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | +| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [1] | `1.0`; `1.1`; `2.0` | Recommended | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [2] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [3] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [4] | | `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended | -**[1]:** `net.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`. +**[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`. -**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[3]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. @@ -89,7 +89,7 @@ Following attributes MUST be provided **at span creation time** (when provided a * `http.method` -`net.sock.family` 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. +`network.socket.family` 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. | Value | Description | |---|---| diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 7007921dd69..1e40e639092 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -194,9 +194,9 @@ The following operations related to messages are defined for these semantic conv | `messaging.message.payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. | `2048` | Recommended: [6] | | `messaging.message.payload_size_bytes` | int | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | Recommended: [7] | | [`net.peer.name`](span-general.md) | string | Logical remote hostname, see note below. [8] | `example.com` | Conditionally Required: If available. | -| [`net.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | -| [`net.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [9] | `3.1.1` | Recommended | -| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [10] | +| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | +| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [9] | `3.1.1` | Recommended | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [10] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [11] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [12] | @@ -217,9 +217,9 @@ The following operations related to messages are defined for these semantic conv **[8]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from. -**[9]:** `net.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`. +**[9]:** `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`. -**[10]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[10]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[11]:** If different than `net.peer.name` and if `net.sock.peer.addr` is set. @@ -235,7 +235,7 @@ The following operations related to messages are defined for these semantic conv Additionally `net.peer.port` from the [network attributes][] is recommended. -Furthermore, it is strongly recommended to add the [`net.transport`][] attribute and follow its guidelines, especially for in-process queueing systems (like [Hangfire][], for example). +Furthermore, it is strongly recommended to add the [`network.transport`][] attribute and follow its guidelines, especially for in-process queueing systems (like [Hangfire][], for example). These attributes should be set to the broker to which the message is sent/from which it is received. ### Attribute namespaces @@ -253,7 +253,7 @@ Messaging system-specific attributes MUST be defined in the corresponding `messa as described in [Attributes specific to certain messaging systems](#attributes-specific-to-certain-messaging-systems). [network attributes]: span-general.md#general-network-connection-attributes -[`net.transport`]: span-general.md#network-transport-attributes +[`network.transport`]: span-general.md#network-transport-attributes [Hangfire]: https://www.hangfire.io/ ### Producer attributes diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index b70a97fa77b..60db63634ce 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -67,11 +67,11 @@ Examples of span names: | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [2] | `exampleMethod` | Recommended | | [`net.peer.name`](span-general.md) | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [3] | `example.com` | Required | | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: See below | -| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | +| [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -101,7 +101,7 @@ Examples of span names: For client-side spans `net.peer.port` is required if the connection is IP-based and the port is available (it describes the server port they are connecting to). For server-side spans `net.peer.port` is optional (it describes the port the client is connecting from). -Furthermore, setting [net.transport][] is required for non-IP connection like named pipe bindings. +Furthermore, setting [network.transport][] is required for non-IP connection like named pipe bindings. #### Service name @@ -115,7 +115,7 @@ In this example, spans representing client request should have their `peer.servi Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service name. [network attributes]: span-general.md#general-network-connection-attributes -[net.transport]: span-general.md#network-transport-attributes +[network.transport]: span-general.md#network-transport-attributes [`service.name`]: ../../resource/semantic_conventions/README.md#service [`peer.service`]: span-general.md#general-remote-service-attributes @@ -125,11 +125,11 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | [`net.host.name`](span-general.md) | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | -| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [1] | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [1] | | [`net.sock.host.addr`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | | [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Conditionally Required: [2] | -**[1]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[1]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[2]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 04cff6cedac..c83223e5e73 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -12,7 +12,7 @@ Particular operations may refer to or require some of these attributes. - [General network connection attributes](#general-network-connection-attributes) * [Network transport attributes](#network-transport-attributes) - * [`net.host.connection.*` and `net.host.carrier.*` attributes](#nethostconnection-and-nethostcarrier-attributes) + * [`network.host.connection.*` and `network.host.carrier.*` attributes](#nethostconnection-and-nethostcarrier-attributes) * [`net.peer.name` and `net.host.name` attributes](#netpeername-and-nethostname-attributes) + [`net.peer.name`](#netpeername) + [`net.host.name`](#nethostname) @@ -46,13 +46,13 @@ if they do not cause breaking changes to HTTP semantic conventions. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `net.transport` | string | Transport protocol used. See note below. | `ip_tcp` | Recommended | -| `net.protocol.name` | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | -| `net.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended | +| `network.transport` | string | Transport protocol used. See note below. | `ip_tcp` | Recommended | +| `network.protocol.name` | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| `network.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended | | `net.sock.peer.name` | string | Remote socket peer name. | `proxy.example.com` | Recommended: [2] | | `net.sock.peer.addr` | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | `net.sock.peer.port` | int | Remote socket peer port. | `16456` | Recommended: [3] | -| `net.sock.family` | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [4] | +| `network.socket.family` | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [4] | | `net.peer.name` | string | Logical remote hostname, see note below. [5] | `example.com` | Recommended | | `net.peer.port` | int | Logical remote port number | `80`; `8080`; `443` | Recommended | | `net.host.name` | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | @@ -60,19 +60,19 @@ if they do not cause breaking changes to HTTP semantic conventions. | `net.sock.host.addr` | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | | `net.sock.host.port` | int | Local socket port number. | `35555` | Conditionally Required: [6] | -**[1]:** `net.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`. +**[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`. **[2]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. **[3]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[5]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. **[6]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. -`net.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. +`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. | Value | Description | |---|---| @@ -84,7 +84,7 @@ if they do not cause breaking changes to HTTP semantic conventions. **[1]:** Signals that there is only in-process communication not using a "real" network protocol in cases where network attributes would normally be expected. Usually all other network attributes can be left out in that case. -`net.sock.family` 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. +`network.socket.family` 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. | Value | Description | |---|---| @@ -95,19 +95,19 @@ if they do not cause breaking changes to HTTP semantic conventions. For `Unix` and `pipe`, since the connection goes over the file system instead of being directly to a known peer, `net.peer.name` is the only attribute that usually makes sense (see description of `net.peer.name` below). -### `net.host.connection.*` and `net.host.carrier.*` attributes +### `network.host.connection.*` and `network.host.carrier.*` attributes | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `net.host.connection.type` | string | The internet connection type currently being used by the host. | `wifi` | Recommended | -| `net.host.connection.subtype` | string | This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. | `LTE` | Recommended | -| `net.host.carrier.name` | string | The name of the mobile carrier. | `sprint` | Recommended | -| `net.host.carrier.mcc` | string | The mobile carrier country code. | `310` | Recommended | -| `net.host.carrier.mnc` | string | The mobile carrier network code. | `001` | Recommended | -| `net.host.carrier.icc` | string | The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. | `DE` | Recommended | +| `network.host.connection.type` | string | The internet connection type currently being used by the host. | `wifi` | Recommended | +| `network.host.connection.subtype` | string | This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. | `LTE` | Recommended | +| `network.host.carrier.name` | string | The name of the mobile carrier. | `sprint` | Recommended | +| `network.host.carrier.mcc` | string | The mobile carrier country code. | `310` | Recommended | +| `network.host.carrier.mnc` | string | The mobile carrier network code. | `001` | Recommended | +| `network.host.carrier.icc` | string | The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. | `DE` | Recommended | -`net.host.connection.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. +`network.host.connection.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. | Value | Description | |---|---| @@ -117,7 +117,7 @@ For `Unix` and `pipe`, since the connection goes over the file system instead of | `unavailable` | unavailable | | `unknown` | unknown | -`net.host.connection.subtype` 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. +`network.host.connection.subtype` 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. | Value | Description | |---|---| @@ -161,7 +161,7 @@ Sometimes host name is only available to instrumentation as a string which may c If only IP address is available via `net.sock.peer.addr`, `net.peer.name` SHOULD NOT be set. Reverse DNS lookup SHOULD NOT be used to obtain DNS name. -If `net.transport` is `"pipe"`, the absolute path to the file representing it should be used as `net.peer.name` (`net.host.name` doesn't make sense in that context). +If `network.transport` is `"pipe"`, the absolute path to the file representing it should be used as `net.peer.name` (`net.host.name` doesn't make sense in that context). If there is no such file (e.g., anonymous pipe), the name should explicitly be set to the empty string to distinguish it from the case where the name is just unknown or not covered by the instrumentation. @@ -183,7 +183,7 @@ _Note: this section applies to socket connections visible to instrumentations. I Socket-level attributes identify peer and host that are directly connected to each other. Since instrumentations may have limited knowledge on network information, instrumentations SHOULD populate such attributes to the best of their knowledge when populate them at all. -`net.sock.family` identifies address family specified when connecting to the socket. For example, it matches `sa_family` field of `sockaddr` structure on [Linux](https://man7.org/linux/man-pages/man0/sys_socket.h.0p.html) and [Windows](https://docs.microsoft.com/windows/win32/api/winsock/ns-winsock-sockaddr). +`network.socket.family` identifies address family specified when connecting to the socket. For example, it matches `sa_family` field of `sockaddr` structure on [Linux](https://man7.org/linux/man-pages/man0/sys_socket.h.0p.html) and [Windows](https://docs.microsoft.com/windows/win32/api/winsock/ns-winsock-sockaddr). _Note: Specific structures and methods to obtain socket-level attributes are mentioned here only as examples. Instrumentations would usually use Socket API provided by their environment or sockets implementations._ From a6be2192070cdb5f4370db3b6c8780698ac781f2 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:26:44 -0700 Subject: [PATCH 05/22] prefix --- semantic_conventions/trace/general.yaml | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 915f8d14096..5e6780677cd 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -1,11 +1,11 @@ groups: - id: network-core - prefix: net + # TODO (trask) bring back prefix after https://github.com/open-telemetry/opentelemetry-specification/pull/3402 type: attribute_group brief: > These attributes may be used for any network related operation. attributes: - - id: transport + - id: network.transport type: allow_custom_values: true members: @@ -28,11 +28,11 @@ groups: brief: 'Something else (non IP-based).' brief: > Transport protocol used. See note below. - - id: protocol.name + - id: network.protocol.name type: string brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.' examples: ['amqp', 'http', 'mqtt'] - - id: protocol.version + - id: network.protocol.version type: string brief: 'Version of the application layer protocol used. See note below.' examples: '3.1.1' @@ -40,25 +40,25 @@ groups: `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`. - - id: sock.peer.name + - id: net.sock.peer.name type: string brief: Remote socket peer name. requirement_level: recommended: If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. examples: proxy.example.com - - id: sock.peer.addr + - id: net.sock.peer.addr type: string brief: > Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). examples: ['127.0.0.1', '/tmp/mysql.sock' ] - - id: sock.peer.port + - id: net.sock.peer.port type: int brief: Remote socket peer port. requirement_level: recommended: If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. examples: 16456 - - id: sock.family + - id: network.socket.family type: allow_custom_values: true members: @@ -80,36 +80,36 @@ groups: brief: > Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. examples: ['inet6', 'bluetooth'] - - id: peer.name + - id: net.peer.name type: string brief: 'Logical remote hostname, see note below.' examples: 'example.com' note: > `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. - - id: peer.port + - id: net.peer.port type: int brief: 'Logical remote port number' examples: [80, 8080, 443] - - id: host.name + - id: net.host.name type: string brief: 'Logical local hostname or similar, see note below.' examples: 'localhost' - - id: host.port + - id: net.host.port type: int brief: 'Logical local port number, preferably the one that the peer used to connect' examples: 8080 - - id: sock.host.addr + - id: net.sock.host.addr type: string brief: Local socket address. Useful in case of a multi-IP host. examples: '192.168.0.1' - - id: sock.host.port + - id: net.sock.host.port type: int brief: 'Local socket port number.' requirement_level: conditionally_required: If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. examples: 35555 - id: network-connection-and-carrier - prefix: net + prefix: network type: attribute_group brief: > These attributes may be used for any network related operation. From 50d2c108fda5ef493eafa4fc704b64fe9d425adf Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Apr 2023 20:27:35 -0700 Subject: [PATCH 06/22] generation --- .../semantic_conventions/http-metrics.md | 6 +++--- .../semantic_conventions/rpc-metrics.md | 2 +- .../trace/semantic_conventions/database.md | 8 ++++---- .../trace/semantic_conventions/http.md | 18 +++++++++--------- .../trace/semantic_conventions/messaging.md | 18 +++++++++--------- .../trace/semantic_conventions/rpc.md | 10 +++++----- .../trace/semantic_conventions/span-general.md | 2 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index 169c8c93978..121279ca542 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -234,9 +234,9 @@ 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, | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | +| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | -| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -270,9 +270,9 @@ This metric is optional. | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | +| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | -| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -306,9 +306,9 @@ This metric is optional. | `http.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. | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | +| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | -| [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | **[1]:** Determined by using the first of the following that applies diff --git a/specification/metrics/semantic_conventions/rpc-metrics.md b/specification/metrics/semantic_conventions/rpc-metrics.md index 850cc188612..36a72d9192a 100644 --- a/specification/metrics/semantic_conventions/rpc-metrics.md +++ b/specification/metrics/semantic_conventions/rpc-metrics.md @@ -73,10 +73,10 @@ measurements. | [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [2] | `exampleMethod` | Recommended | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [3] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: See below | -| [`network.socket.family`](../../trace/semantic_conventions/span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | +| [`network.socket.family`](../../trace/semantic_conventions/span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`network.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 372b974236c..b2c6556df6d 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -46,18 +46,18 @@ Some database systems may allow a connection to switch to a different `db.user`, | `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | Recommended | | [`net.peer.name`](span-general.md) | string | Name of the database host. [1] | `example.com` | Conditionally Required: See alternative attributes below. | | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: [2] | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [3] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | -| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [4] | +| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [3] | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [4] | | [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: [5] | **[1]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. **[2]:** If using a port other than the default port for this DBMS and if `net.peer.name` is set. -**[3]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[3]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[4]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. +**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. **[5]:** If database type is in-process (`"inproc"`), recommended for other database types. diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index 9286b2ff78a..fb3db563fc2 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -69,21 +69,21 @@ sections below. | `http.request_content_length` | int | The size of the request 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_content_length` | 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.method` | string | HTTP request method. | `GET`; `POST`; `HEAD` | Required | -| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | -| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [1] | `1.0`; `1.1`; `2.0` | Recommended | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [2] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | -| [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [3] | -| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [4] | +| [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [1] | +| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [2] | +| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | +| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [3] | `1.0`; `1.1`; `2.0` | Recommended | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [4] | | `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended | -**[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`. +**[1]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. -**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[2]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[3]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. +**[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`. -**[4]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. +**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 1e40e639092..f00efb1a1b9 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -194,12 +194,12 @@ The following operations related to messages are defined for these semantic conv | `messaging.message.payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. | `2048` | Recommended: [6] | | `messaging.message.payload_size_bytes` | int | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | Recommended: [7] | | [`net.peer.name`](span-general.md) | string | Logical remote hostname, see note below. [8] | `example.com` | Conditionally Required: If available. | -| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | -| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [9] | `3.1.1` | Recommended | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [10] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | -| [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [11] | -| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [12] | +| [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [9] | +| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [10] | +| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | +| [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [11] | `3.1.1` | Recommended | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [12] | **[1]:** If a custom value is used, it MUST be of low cardinality. @@ -217,13 +217,13 @@ The following operations related to messages are defined for these semantic conv **[8]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from. -**[9]:** `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`. +**[9]:** If different than `net.peer.name` and if `net.sock.peer.addr` is set. -**[10]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[10]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[11]:** If different than `net.peer.name` and if `net.sock.peer.addr` is set. +**[11]:** `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`. -**[12]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. +**[12]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. `messaging.operation` 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. diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index 60db63634ce..bd30e4c882b 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -67,10 +67,10 @@ Examples of span names: | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [2] | `exampleMethod` | Recommended | | [`net.peer.name`](span-general.md) | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [3] | `example.com` | Required | | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: See below | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | | [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -125,13 +125,13 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | [`net.host.name`](span-general.md) | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [1] | | [`net.sock.host.addr`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | -| [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Conditionally Required: [2] | +| [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Conditionally Required: [1] | +| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [2] | -**[1]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[1]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. -**[2]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. +**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. ### Events diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index c83223e5e73..60940fcfe9b 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -12,7 +12,7 @@ Particular operations may refer to or require some of these attributes. - [General network connection attributes](#general-network-connection-attributes) * [Network transport attributes](#network-transport-attributes) - * [`network.host.connection.*` and `network.host.carrier.*` attributes](#nethostconnection-and-nethostcarrier-attributes) + * [`network.host.connection.*` and `network.host.carrier.*` attributes](#networkhostconnection-and-networkhostcarrier-attributes) * [`net.peer.name` and `net.host.name` attributes](#netpeername-and-nethostname-attributes) + [`net.peer.name`](#netpeername) + [`net.host.name`](#nethostname) From bb3d553951dc5dc7a717d05cb352e38885487d3d Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 21 Apr 2023 10:50:40 -0700 Subject: [PATCH 07/22] Apply suggestions from code review Co-authored-by: Liudmila Molkova --- specification/trace/semantic_conventions/database.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index b2c6556df6d..33c6bfb92ec 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -285,7 +285,7 @@ In addition to Cosmos DB attributes, all spans include | `net.peer.name` | `"shopdb.example.com"` | | `net.sock.peer.addr` | `"192.0.2.12"` | | `net.peer.port` | `3306` | -| `network.transport` | `"IP.TCP"` | +| `network.transport` | `"IP.TCP"` | | `db.name` | `"ShopDb"` | | `db.statement` | `"SELECT * FROM orders WHERE order_id = 'o4711'"` | | `db.operation` | `"SELECT"` | @@ -303,7 +303,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `db.connection_string` | not set | | `db.user` | not set | | `net.peer.name` | `"/tmp/redis.sock"` | -| `network.transport` | `"Unix"` | +| `network.transport` | `"Unix"` | | `db.name` | not set | | `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` | | `db.operation` | not set | @@ -320,7 +320,7 @@ Furthermore, `db.name` is not specified as there is no database name in Redis an | `net.peer.name` | `"mongodb0.example.com"` | | `net.sock.peer.addr` | `"192.0.2.14"` | | `net.peer.port` | `27017` | -| `network.transport` | `"IP.TCP"` | +| `network.transport` | `"IP.TCP"` | | `db.name` | `"shopDb"` | | `db.statement` | not set | | `db.operation` | `"findAndModify"` | From 6c3171f32be2a9c1ca32beb09cee8b4da769316f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 21 Apr 2023 11:04:05 -0700 Subject: [PATCH 08/22] Keep old attributes as deprecated --- semantic_conventions/trace/general.yaml | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 5e6780677cd..89a3377f653 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -1,4 +1,59 @@ groups: + - id: network-deprecated + prefix: net + type: attribute_group + brief: > + These attributes may be used for any network related operation. + attributes: + - id: transport + type: + allow_custom_values: true + members: + - id: ip_tcp + value: "ip_tcp" + - id: ip_udp + value: "ip_udp" + - id: pipe + value: "pipe" + brief: 'Named or anonymous pipe. See note below.' + - id: inproc + value: "inproc" + brief: 'In-process communication.' + note: > + Signals that there is only in-process communication not using a "real" network protocol + in cases where network attributes would normally be expected. Usually all other network + attributes can be left out in that case. + - id: other + value: "other" + brief: 'Something else (non IP-based).' + stability: deprecated + brief: Deprecated, use `network.transport`. + - id: protocol.name + type: string + stability: deprecated + brief: Deprecated, use `network.protocol.name`. + examples: ['amqp', 'http', 'mqtt'] + - id: protocol.version + type: string + stability: deprecated + brief: Deprecated, use `network.protocol.version`. + examples: '3.1.1' + - id: sock.family + type: + allow_custom_values: true + members: + - id: inet + value: 'inet' + brief: "IPv4 address" + - id: inet6 + value: 'inet6' + brief: "IPv6 address" + - id: unix + value: 'unix' + brief: "Unix domain socket path" + stability: deprecated + brief: Deprecated, use `network.socket.family`. + - id: network-core # TODO (trask) bring back prefix after https://github.com/open-telemetry/opentelemetry-specification/pull/3402 type: attribute_group From b344af36df5e1d0d3abce9465187ded2acf317f5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 25 Apr 2023 14:11:24 -0700 Subject: [PATCH 09/22] remove network.socket.family in favor of network.type and network.transport --- schemas/1.21.0 | 2 - semantic_conventions/trace/database.yaml | 8 +-- semantic_conventions/trace/general.yaml | 64 ++++++++----------- semantic_conventions/trace/http.yaml | 5 +- semantic_conventions/trace/messaging.yaml | 4 +- semantic_conventions/trace/rpc.yaml | 11 ++-- .../semantic_conventions/rpc-metrics.md | 4 +- .../trace/semantic_conventions/database.md | 8 +-- .../trace/semantic_conventions/http.md | 21 ++++-- .../trace/semantic_conventions/messaging.md | 5 +- .../trace/semantic_conventions/rpc.md | 10 ++- .../semantic_conventions/span-general.md | 30 ++++----- 12 files changed, 75 insertions(+), 97 deletions(-) diff --git a/schemas/1.21.0 b/schemas/1.21.0 index 6e9aa2cd599..49abcf7ad84 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -14,8 +14,6 @@ versions: attribute_map: net.protocol.name: network.protocol.name net.protocol.version: network.protocol.version - net.transport: network.transport - net.sock.family: network.socket.family net.host.connection.type: network.host.connection.type net.host.connection.subtype: network.host.connection.subtype net.host.carrier.name: network.host.carrier.name diff --git a/semantic_conventions/trace/database.yaml b/semantic_conventions/trace/database.yaml index a8b60303085..7194f5b0992 100644 --- a/semantic_conventions/trace/database.yaml +++ b/semantic_conventions/trace/database.yaml @@ -242,15 +242,13 @@ groups: tag: connection-level - ref: net.sock.peer.port tag: connection-level - - ref: network.socket.family + - ref: network.transport + tag: connection-level + - ref: network.type tag: connection-level - ref: net.sock.peer.name requirement_level: recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set. - - ref: network.transport - tag: connection-level - requirement_level: - conditionally_required: If database type is in-process (`"inproc"`), recommended for other database types. constraints: - any_of: - 'net.peer.name' diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 89a3377f653..893c616470c 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -52,7 +52,7 @@ groups: value: 'unix' brief: "Unix domain socket path" stability: deprecated - brief: Deprecated, use `network.socket.family`. + brief: Deprecated, use `network.transport` and `network.type`. - id: network-core # TODO (trask) bring back prefix after https://github.com/open-telemetry/opentelemetry-specification/pull/3402 @@ -64,25 +64,35 @@ groups: type: allow_custom_values: true members: - - id: ip_tcp - value: "ip_tcp" - - id: ip_udp - value: "ip_udp" + - id: tcp + value: 'tcp' + brief: "TCP" + - id: udp + value: 'udp' + brief: "UDP" - id: pipe value: "pipe" brief: 'Named or anonymous pipe. See note below.' - - id: inproc - value: "inproc" - brief: 'In-process communication.' - note: > - Signals that there is only in-process communication not using a "real" network protocol - in cases where network attributes would normally be expected. Usually all other network - attributes can be left out in that case. - - id: other - value: "other" - brief: 'Something else (non IP-based).' + - id: unix + value: 'unix' + brief: "Unix domain socket" + brief: > + [OSI Transport Layer](https://osi-model.com/transport-layer/) or + [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). + examples: ['tcp', 'udp'] + - id: network.type + type: + allow_custom_values: true + members: + - id: ipv4 + value: 'ipv4' + brief: "IPv4" + - id: ipv6 + value: 'ipv6' + brief: "IPv6" brief: > - Transport protocol used. See note below. + [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + examples: ['ipv4', 'ipv6'] - id: network.protocol.name type: string brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.' @@ -113,28 +123,6 @@ groups: requirement_level: recommended: If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. examples: 16456 - - id: network.socket.family - type: - allow_custom_values: true - members: - - id: inet - value: 'inet' - brief: "IPv4 address" - - id: inet6 - value: 'inet6' - brief: "IPv6 address" - - id: unix - value: 'unix' - brief: "Unix domain socket path" - requirement_level: - conditionally_required: > - If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. - Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` - if `network.socket.family` is not set. This is to support instrumentations that follow previous versions - of this document. - brief: > - Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. - examples: ['inet6', 'bluetooth'] - id: net.peer.name type: string brief: 'Logical remote hostname, see note below.' diff --git a/semantic_conventions/trace/http.yaml b/semantic_conventions/trace/http.yaml index 42bbabec227..d5f127fd2c4 100644 --- a/semantic_conventions/trace/http.yaml +++ b/semantic_conventions/trace/http.yaml @@ -27,8 +27,9 @@ groups: - ref: net.sock.peer.addr - ref: net.sock.peer.port - ref: net.sock.peer.name - - ref: network.socket.family - examples: ['inet', 'inet6'] + - ref: network.transport + - ref: network.type + examples: ['ipv4', 'ipv6'] - ref: user_agent.original - id: trace.http.client diff --git a/semantic_conventions/trace/messaging.yaml b/semantic_conventions/trace/messaging.yaml index 51991e62059..4f7274cc4f0 100644 --- a/semantic_conventions/trace/messaging.yaml +++ b/semantic_conventions/trace/messaging.yaml @@ -150,7 +150,9 @@ groups: tag: connection-level - ref: net.sock.peer.port tag: connection-level - - ref: network.socket.family + - ref: network.transport + tag: connection-level + - ref: network.type tag: connection-level - ref: net.sock.peer.name tag: connection-level diff --git a/semantic_conventions/trace/rpc.yaml b/semantic_conventions/trace/rpc.yaml index 447a9a6fb34..50992036ee8 100644 --- a/semantic_conventions/trace/rpc.yaml +++ b/semantic_conventions/trace/rpc.yaml @@ -53,9 +53,8 @@ groups: - ref: net.sock.peer.port requirement_level: recommended: If different than `net.peer.port` and if `net.sock.peer.addr` is set. - - ref: network.socket.family - requirement_level: - conditionally_required: If and only if `net.sock.peer.addr` is set. + - ref: network.transport + - ref: network.type - ref: net.sock.peer.name requirement_level: recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set. @@ -70,9 +69,6 @@ groups: - ref: net.peer.port requirement_level: conditionally_required: See below - - ref: network.transport - requirement_level: - conditionally_required: See below constraints: - any_of: - net.sock.peer.addr @@ -88,7 +84,8 @@ groups: - ref: net.host.name - ref: net.sock.host.addr - ref: net.sock.host.port - - ref: network.socket.family + - ref: network.transport + - ref: network.type - id: rpc.grpc prefix: rpc.grpc diff --git a/specification/metrics/semantic_conventions/rpc-metrics.md b/specification/metrics/semantic_conventions/rpc-metrics.md index 36a72d9192a..d3308301536 100644 --- a/specification/metrics/semantic_conventions/rpc-metrics.md +++ b/specification/metrics/semantic_conventions/rpc-metrics.md @@ -76,8 +76,8 @@ measurements. | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`network.socket.family`](../../trace/semantic_conventions/span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | -| [`network.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | +| [`network.transport`](../../trace/semantic_conventions/span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](../../trace/semantic_conventions/span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 33c6bfb92ec..0c82dc7ccc3 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -48,8 +48,8 @@ Some database systems may allow a connection to switch to a different `db.user`, | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: [2] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [3] | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [4] | -| [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: [5] | +| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | **[1]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. @@ -57,10 +57,6 @@ Some database systems may allow a connection to switch to a different `db.user`, **[3]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. - -**[5]:** If database type is in-process (`"inproc"`), recommended for other database types. - **Additional attribute requirements:** At least one of the following sets of attributes is required: * [`net.peer.name`](span-general.md) diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index fb3db563fc2..dc2e415723f 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -74,7 +74,8 @@ sections below. | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [2] | | [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | | [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [3] | `1.0`; `1.1`; `2.0` | Recommended | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [4] | +| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | | `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended | **[1]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. @@ -83,19 +84,25 @@ sections below. **[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`. -**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. - Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: * `http.method` -`network.socket.family` 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. +`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. + +| Value | Description | +|---|---| +| `tcp` | TCP | +| `udp` | UDP | +| `pipe` | Named or anonymous pipe. See note below. | +| `unix` | Unix domain socket | + +`network.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. | Value | Description | |---|---| -| `inet` | IPv4 address | -| `inet6` | IPv6 address | -| `unix` | Unix domain socket path | +| `ipv4` | IPv4 | +| `ipv6` | IPv6 | It is recommended to also use the general [socket-level attributes][] - `net.sock.peer.addr` when available, `net.sock.peer.name` and `net.sock.peer.port` when don't match `net.peer.name` and `net.peer.port` (if [intermediary](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.7) is detected). diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 10cc11826f8..33b2494e430 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -200,7 +200,8 @@ The following operations related to messages are defined for these semantic conv | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [10] | | [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | | [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [11] | `3.1.1` | Recommended | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [12] | +| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | **[1]:** If a custom value is used, it MUST be of low cardinality. @@ -224,8 +225,6 @@ The following operations related to messages are defined for these semantic conv **[11]:** `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`. -**[12]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. - `messaging.operation` 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. | Value | Description | diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index bd30e4c882b..20cdcf0fa54 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -70,8 +70,8 @@ Examples of span names: | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: If and only if `net.sock.peer.addr` is set. | -| [`network.transport`](span-general.md) | string | Transport protocol used. See note below. | `ip_tcp` | Conditionally Required: See below | +| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -101,7 +101,6 @@ Examples of span names: For client-side spans `net.peer.port` is required if the connection is IP-based and the port is available (it describes the server port they are connecting to). For server-side spans `net.peer.port` is optional (it describes the port the client is connecting from). -Furthermore, setting [network.transport][] is required for non-IP connection like named pipe bindings. #### Service name @@ -127,11 +126,10 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`net.host.name`](span-general.md) | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | | [`net.sock.host.addr`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | | [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Conditionally Required: [1] | -| [`network.socket.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [2] | +| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | +| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | **[1]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. - -**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. ### Events diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 60940fcfe9b..f4fc46fce86 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -46,19 +46,19 @@ if they do not cause breaking changes to HTTP semantic conventions. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `network.transport` | string | Transport protocol used. See note below. | `ip_tcp` | Recommended | +| `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). | `tcp`; `udp` | Recommended | +| `network.type` | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | | `network.protocol.name` | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | | `network.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended | | `net.sock.peer.name` | string | Remote socket peer name. | `proxy.example.com` | Recommended: [2] | | `net.sock.peer.addr` | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | `net.sock.peer.port` | int | Remote socket peer port. | `16456` | Recommended: [3] | -| `network.socket.family` | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [4] | -| `net.peer.name` | string | Logical remote hostname, see note below. [5] | `example.com` | Recommended | +| `net.peer.name` | string | Logical remote hostname, see note below. [4] | `example.com` | Recommended | | `net.peer.port` | int | Logical remote port number | `80`; `8080`; `443` | Recommended | | `net.host.name` | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | | `net.host.port` | int | Logical local port number, preferably the one that the peer used to connect | `8080` | Recommended | | `net.sock.host.addr` | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | -| `net.sock.host.port` | int | Local socket port number. | `35555` | Conditionally Required: [6] | +| `net.sock.host.port` | int | Local socket port number. | `35555` | Conditionally Required: [5] | **[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`. @@ -66,31 +66,25 @@ if they do not cause breaking changes to HTTP semantic conventions. **[3]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set. -**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `network.socket.family` is not set. This is to support instrumentations that follow previous versions of this document. +**[4]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. -**[5]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. - -**[6]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. +**[5]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. `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. | Value | Description | |---|---| -| `ip_tcp` | ip_tcp | -| `ip_udp` | ip_udp | +| `tcp` | TCP | +| `udp` | UDP | | `pipe` | Named or anonymous pipe. See note below. | -| `inproc` | In-process communication. [1] | -| `other` | Something else (non IP-based). | - -**[1]:** Signals that there is only in-process communication not using a "real" network protocol in cases where network attributes would normally be expected. Usually all other network attributes can be left out in that case. +| `unix` | Unix domain socket | -`network.socket.family` 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. +`network.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. | Value | Description | |---|---| -| `inet` | IPv4 address | -| `inet6` | IPv6 address | -| `unix` | Unix domain socket path | +| `ipv4` | IPv4 | +| `ipv6` | IPv6 | For `Unix` and `pipe`, since the connection goes over the file system instead of being directly to a known peer, `net.peer.name` is the only attribute that usually makes sense (see description of `net.peer.name` below). From eea531a7563d59cc81e0707e44bbca2a5b3a4bd0 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 25 Apr 2023 15:46:40 -0700 Subject: [PATCH 10/22] Update change log --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd18262c566..beb94eb0f47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,11 +43,10 @@ release. ([#3390](https://github.com/open-telemetry/opentelemetry-specification/pull/3390)) - BREAKING: Remove `messaging.consumer.id`, make `messaging.client_id` generic ([#3336](https://github.com/open-telemetry/opentelemetry-specification/pull/3336)) -- BREAKING: Rename `net.protocol.*` to `network.protocol.*`, - `net.transport` to `network.transport`, - `net.sock.family` to `network.socket.family`, +- BREAKING: Replace `net.transport` with combination of `network.type` and + `network.transport`. Rename `net.protocol.*` to `network.protocol.*`, `net.host.connection.*` to `network.host.connection.*`, and - `net.host.carrier.*` to `network.host.carrier.*` + `net.host.carrier.*` to `network.host.carrier.*`. ([#3426](https://github.com/open-telemetry/opentelemetry-specification/pull/3426)) ### Compatibility From e13f484cab243cc2d2eba5e7ae23348964f414d4 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 26 Apr 2023 19:42:06 -0700 Subject: [PATCH 11/22] Update change log --- CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index beb94eb0f47..f6242a668da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,8 +43,12 @@ release. ([#3390](https://github.com/open-telemetry/opentelemetry-specification/pull/3390)) - BREAKING: Remove `messaging.consumer.id`, make `messaging.client_id` generic ([#3336](https://github.com/open-telemetry/opentelemetry-specification/pull/3336)) -- BREAKING: Replace `net.transport` with combination of `network.type` and - `network.transport`. Rename `net.protocol.*` to `network.protocol.*`, +- BREAKING: Introduce `network.transport` defined as + [OSI Transport Layer](https://osi-model.com/transport-layer/) or + [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). + Introduce `network.type` defined as [OSI Network Layer](https://osi-model.com/network-layer/) + or non-OSI equivalent. Remove `net.transport` and `net.sock.family`. + Rename `net.protocol.*` to `network.protocol.*`, `net.host.connection.*` to `network.host.connection.*`, and `net.host.carrier.*` to `network.host.carrier.*`. ([#3426](https://github.com/open-telemetry/opentelemetry-specification/pull/3426)) From 5fd5905b401f6a249274f219897727995d23fbee Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 07:02:33 -0700 Subject: [PATCH 12/22] Update semantic_conventions/trace/http.yaml Co-authored-by: Liudmila Molkova --- semantic_conventions/trace/http.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/semantic_conventions/trace/http.yaml b/semantic_conventions/trace/http.yaml index d5f127fd2c4..c10cba87318 100644 --- a/semantic_conventions/trace/http.yaml +++ b/semantic_conventions/trace/http.yaml @@ -29,7 +29,6 @@ groups: - ref: net.sock.peer.name - ref: network.transport - ref: network.type - examples: ['ipv4', 'ipv6'] - ref: user_agent.original - id: trace.http.client From 72978a65256029348b09c5568e57b93084b4ec17 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 07:07:33 -0700 Subject: [PATCH 13/22] Ref OSI application layer --- semantic_conventions/trace/general.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 893c616470c..5ad3a8b31e7 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -79,6 +79,7 @@ groups: brief: > [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. examples: ['tcp', 'udp'] - id: network.type type: @@ -92,10 +93,13 @@ groups: brief: "IPv6" brief: > [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + The value SHOULD be normalized to lowercase. examples: ['ipv4', 'ipv6'] - id: network.protocol.name type: string - brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.' + brief: > + [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. + The value SHOULD be normalized to lowercase. examples: ['amqp', 'http', 'mqtt'] - id: network.protocol.version type: string From 31944132e048a6f4af26ce2dac24a683f27f701c Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 07:16:34 -0700 Subject: [PATCH 14/22] Remove unused --- specification/trace/semantic_conventions/rpc.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index 20cdcf0fa54..cc5e63aaf21 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -114,7 +114,6 @@ In this example, spans representing client request should have their `peer.servi Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service name. [network attributes]: span-general.md#general-network-connection-attributes -[network.transport]: span-general.md#network-transport-attributes [`service.name`]: ../../resource/semantic_conventions/README.md#service [`peer.service`]: span-general.md#general-remote-service-attributes From 9072006dde52f35d6436ab4466621728b52dbaf8 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 08:04:34 -0700 Subject: [PATCH 15/22] generate tables --- .../metrics/semantic_conventions/http-metrics.md | 12 ++++++------ .../metrics/semantic_conventions/rpc-metrics.md | 4 ++-- specification/trace/semantic_conventions/database.md | 4 ++-- specification/trace/semantic_conventions/http.md | 6 +++--- .../trace/semantic_conventions/messaging.md | 6 +++--- specification/trace/semantic_conventions/rpc.md | 8 ++++---- .../trace/semantic_conventions/span-general.md | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index 121279ca542..3a207360604 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -51,7 +51,7 @@ 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, | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. @@ -136,7 +136,7 @@ This metric is optional. | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. @@ -183,7 +183,7 @@ This metric is optional. | `http.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. | | [`net.host.name`](../../trace/semantic_conventions/span-general.md) | string | Name of the local HTTP server that received the request. [2] | `localhost` | Required | | [`net.host.port`](../../trace/semantic_conventions/span-general.md) | int | Port of the local HTTP server that received the request. [3] | `8080` | Conditionally Required: [4] | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [5] | `3.1.1` | Recommended | **[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. @@ -235,7 +235,7 @@ 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, | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -271,7 +271,7 @@ This metric is optional. | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | **[1]:** Determined by using the first of the following that applies @@ -307,7 +307,7 @@ This metric is optional. | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [1] | `example.com` | Required | | [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to. [2] | `80`; `8080`; `443` | Conditionally Required: [3] | | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | -| [`network.protocol.name`](../../trace/semantic_conventions/span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| [`network.protocol.name`](../../trace/semantic_conventions/span-general.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 | | [`network.protocol.version`](../../trace/semantic_conventions/span-general.md) | string | Version of the application layer protocol used. See note below. [4] | `3.1.1` | Recommended | **[1]:** Determined by using the first of the following that applies diff --git a/specification/metrics/semantic_conventions/rpc-metrics.md b/specification/metrics/semantic_conventions/rpc-metrics.md index d3308301536..a06b81bf88f 100644 --- a/specification/metrics/semantic_conventions/rpc-metrics.md +++ b/specification/metrics/semantic_conventions/rpc-metrics.md @@ -76,8 +76,8 @@ measurements. | [`net.sock.peer.addr`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](../../trace/semantic_conventions/span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`network.transport`](../../trace/semantic_conventions/span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](../../trace/semantic_conventions/span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](../../trace/semantic_conventions/span-general.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 | +| [`network.type`](../../trace/semantic_conventions/span-general.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 | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 0c82dc7ccc3..6b4d0362b26 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -48,8 +48,8 @@ Some database systems may allow a connection to switch to a different `db.user`, | [`net.peer.port`](span-general.md) | int | Logical remote port number | `80`; `8080`; `443` | Conditionally Required: [2] | | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [3] | -| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](span-general.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 | +| [`network.type`](span-general.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 | **[1]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup. diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index dc2e415723f..e1bfc3fe5c1 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -72,10 +72,10 @@ sections below. | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [1] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [2] | -| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | +| [`network.protocol.name`](span-general.md) | string | [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | | [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [3] | `1.0`; `1.1`; `2.0` | Recommended | -| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](span-general.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 | +| [`network.type`](span-general.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 | | `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended | **[1]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set. diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 33b2494e430..c0b753561ff 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -198,10 +198,10 @@ The following operations related to messages are defined for these semantic conv | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [9] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [10] | -| [`network.protocol.name`](span-general.md) | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | +| [`network.protocol.name`](span-general.md) | string | [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `amqp`; `mqtt` | Recommended | | [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [11] | `3.1.1` | Recommended | -| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](span-general.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 | +| [`network.type`](span-general.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 | **[1]:** If a custom value is used, it MUST be of low cardinality. diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index cc5e63aaf21..cbb0d3916b4 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -70,8 +70,8 @@ Examples of span names: | [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | See below | | [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [4] | | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [5] | -| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](span-general.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 | +| [`network.type`](span-general.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 | **[1]:** This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). @@ -125,8 +125,8 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service | [`net.host.name`](span-general.md) | string | Logical local hostname or similar, see note below. | `localhost` | Recommended | | [`net.sock.host.addr`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host. | `192.168.0.1` | Recommended | | [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Conditionally Required: [1] | -| [`network.transport`](span-general.md) | string | [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). | `tcp`; `udp` | Recommended | -| [`network.type`](span-general.md) | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | +| [`network.transport`](span-general.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 | +| [`network.type`](span-general.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 | **[1]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this. diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index f4fc46fce86..9c977705dc9 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -46,9 +46,9 @@ if they do not cause breaking changes to HTTP semantic conventions. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `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). | `tcp`; `udp` | Recommended | -| `network.type` | string | [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. | `ipv4`; `ipv6` | Recommended | -| `network.protocol.name` | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `mqtt` | Recommended | +| `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. | `tcp`; `udp` | Recommended | +| `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 | +| `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 | | `network.protocol.version` | string | Version of the application layer protocol used. See note below. [1] | `3.1.1` | Recommended | | `net.sock.peer.name` | string | Remote socket peer name. | `proxy.example.com` | Recommended: [2] | | `net.sock.peer.addr` | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended | From eb438b44af04b216de894373c6d717cf5a4e8a31 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 12:22:22 -0700 Subject: [PATCH 16/22] Add defaults for http network.transport --- semantic_conventions/trace/http.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semantic_conventions/trace/http.yaml b/semantic_conventions/trace/http.yaml index c10cba87318..0f5cf2c1666 100644 --- a/semantic_conventions/trace/http.yaml +++ b/semantic_conventions/trace/http.yaml @@ -28,6 +28,8 @@ groups: - ref: net.sock.peer.port - ref: net.sock.peer.name - ref: network.transport + requirement_level: + conditionally_required: If not default (`tcp` for `HTTP/1.1` and `HTTP/2`, `udp` for `HTTP/3`). - ref: network.type - ref: user_agent.original From 4f09aeaca06c466f0066f16a330f720c7331eebd Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 28 Apr 2023 12:26:03 -0700 Subject: [PATCH 17/22] generate tables --- specification/trace/semantic_conventions/http.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index e1bfc3fe5c1..e95951d9866 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -74,7 +74,7 @@ sections below. | [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [2] | | [`network.protocol.name`](span-general.md) | string | [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. | `http`; `spdy` | Recommended: if not default (`http`). | | [`network.protocol.version`](span-general.md) | string | Version of the application layer protocol used. See note below. [3] | `1.0`; `1.1`; `2.0` | Recommended | -| [`network.transport`](span-general.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 | +| [`network.transport`](span-general.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` | Conditionally Required: [4] | | [`network.type`](span-general.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 | | `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended | @@ -84,6 +84,8 @@ sections below. **[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`. +**[4]:** If not default (`tcp` for `HTTP/1.1` and `HTTP/2`, `udp` for `HTTP/3`). + Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions: * `http.method` From 6636dac7f0a761e08ca69d17555a2fb83312e4b4 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 3 May 2023 11:08:27 -0700 Subject: [PATCH 18/22] Simplify mobile attribute names --- CHANGELOG.md | 4 ++-- schemas/1.21.0 | 12 +++++------ semantic_conventions/trace/general.yaml | 14 ++++++------- .../semantic_conventions/span-general.md | 20 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6242a668da..8c93ae21464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,8 +49,8 @@ release. Introduce `network.type` defined as [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. Remove `net.transport` and `net.sock.family`. Rename `net.protocol.*` to `network.protocol.*`, - `net.host.connection.*` to `network.host.connection.*`, and - `net.host.carrier.*` to `network.host.carrier.*`. + `net.host.connection.*` to `network.connection.*`, and + `net.host.carrier.*` to `network.carrier.*`. ([#3426](https://github.com/open-telemetry/opentelemetry-specification/pull/3426)) ### Compatibility diff --git a/schemas/1.21.0 b/schemas/1.21.0 index 49abcf7ad84..a1e6ea71c2f 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -14,12 +14,12 @@ versions: attribute_map: net.protocol.name: network.protocol.name net.protocol.version: network.protocol.version - net.host.connection.type: network.host.connection.type - net.host.connection.subtype: network.host.connection.subtype - net.host.carrier.name: network.host.carrier.name - net.host.carrier.mcc: network.host.carrier.mcc - net.host.carrier.mnc: network.host.carrier.mnc - net.host.carrier.icc: network.host.carrier.icc + net.host.connection.type: network.connection.type + net.host.connection.subtype: network.connection.subtype + net.host.carrier.name: network.carrier.name + net.host.carrier.mcc: network.carrier.mcc + net.host.carrier.mnc: network.carrier.mnc + net.host.carrier.icc: network.carrier.icc 1.20.0: spans: changes: diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 5ad3a8b31e7..1b3e6b00801 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -161,7 +161,7 @@ groups: brief: > These attributes may be used for any network related operation. attributes: - - id: host.connection.type + - id: connection.type type: allow_custom_values: true members: @@ -175,9 +175,9 @@ groups: value: "unavailable" - id: unknown value: "unknown" - brief: 'The internet connection type currently being used by the host.' + brief: 'The internet connection type.' examples: 'wifi' - - id: host.connection.subtype + - id: connection.subtype type: allow_custom_values: true members: @@ -246,19 +246,19 @@ groups: value: "lte_ca" brief: 'This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.' examples: 'LTE' - - id: host.carrier.name + - id: carrier.name type: string brief: "The name of the mobile carrier." examples: "sprint" - - id: host.carrier.mcc + - id: carrier.mcc type: string brief: "The mobile carrier country code." examples: "310" - - id: host.carrier.mnc + - id: carrier.mnc type: string brief: "The mobile carrier network code." examples: "001" - - id: host.carrier.icc + - id: carrier.icc type: string brief: "The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network." examples: "DE" diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 9c977705dc9..8508dcdad03 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -12,7 +12,7 @@ Particular operations may refer to or require some of these attributes. - [General network connection attributes](#general-network-connection-attributes) * [Network transport attributes](#network-transport-attributes) - * [`network.host.connection.*` and `network.host.carrier.*` attributes](#networkhostconnection-and-networkhostcarrier-attributes) + * [`network.connection.*` and `network.carrier.*` attributes](#networkhostconnection-and-networkhostcarrier-attributes) * [`net.peer.name` and `net.host.name` attributes](#netpeername-and-nethostname-attributes) + [`net.peer.name`](#netpeername) + [`net.host.name`](#nethostname) @@ -89,19 +89,19 @@ if they do not cause breaking changes to HTTP semantic conventions. For `Unix` and `pipe`, since the connection goes over the file system instead of being directly to a known peer, `net.peer.name` is the only attribute that usually makes sense (see description of `net.peer.name` below). -### `network.host.connection.*` and `network.host.carrier.*` attributes +### `network.connection.*` and `network.carrier.*` attributes | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `network.host.connection.type` | string | The internet connection type currently being used by the host. | `wifi` | Recommended | -| `network.host.connection.subtype` | string | This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. | `LTE` | Recommended | -| `network.host.carrier.name` | string | The name of the mobile carrier. | `sprint` | Recommended | -| `network.host.carrier.mcc` | string | The mobile carrier country code. | `310` | Recommended | -| `network.host.carrier.mnc` | string | The mobile carrier network code. | `001` | Recommended | -| `network.host.carrier.icc` | string | The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. | `DE` | Recommended | +| `network.connection.type` | string | The internet connection type. | `wifi` | Recommended | +| `network.connection.subtype` | string | This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. | `LTE` | Recommended | +| `network.carrier.name` | string | The name of the mobile carrier. | `sprint` | Recommended | +| `network.carrier.mcc` | string | The mobile carrier country code. | `310` | Recommended | +| `network.carrier.mnc` | string | The mobile carrier network code. | `001` | Recommended | +| `network.carrier.icc` | string | The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. | `DE` | Recommended | -`network.host.connection.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. +`network.connection.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. | Value | Description | |---|---| @@ -111,7 +111,7 @@ For `Unix` and `pipe`, since the connection goes over the file system instead of | `unavailable` | unavailable | | `unknown` | unknown | -`network.host.connection.subtype` 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. +`network.connection.subtype` 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. | Value | Description | |---|---| From 8b63da1d5f2ece81cd61d94897f6adab4e11f976 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 3 May 2023 11:14:03 -0700 Subject: [PATCH 19/22] Fix link --- specification/trace/semantic_conventions/span-general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 8508dcdad03..76fcc6b696a 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -12,7 +12,7 @@ Particular operations may refer to or require some of these attributes. - [General network connection attributes](#general-network-connection-attributes) * [Network transport attributes](#network-transport-attributes) - * [`network.connection.*` and `network.carrier.*` attributes](#networkhostconnection-and-networkhostcarrier-attributes) + * [`network.connection.*` and `network.carrier.*` attributes](#networkconnection-and-networkcarrier-attributes) * [`net.peer.name` and `net.host.name` attributes](#netpeername-and-nethostname-attributes) + [`net.peer.name`](#netpeername) + [`net.host.name`](#nethostname) From 09b88902ecb69492ecb167e05d855c647466bbde Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 8 May 2023 16:59:43 -0700 Subject: [PATCH 20/22] Post merge fixes --- specification/trace/semantic_conventions/span-general.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index a150f11374f..ec73c9db351 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -74,7 +74,7 @@ On client side, it's usually passed in form of URL, connection string, host name If only IP address is available, it should be populated on `server.address`. Reverse DNS lookup SHOULD NOT be used to obtain DNS name. -If `net.transport` is `"pipe"`, the absolute path to the file representing it should be used as `server.address`. +If `network.transport` is `"pipe"`, the absolute path to the file representing it should be used as `server.address`. If there is no such file (e.g., anonymous pipe), the name should explicitly be set to the empty string to distinguish it from the case where the name is just unknown or not covered by the instrumentation. @@ -86,8 +86,6 @@ _Note: this section applies to socket connections visible to instrumentations. I Socket-level attributes identify peer and host that are directly connected to each other. Since instrumentations may have limited knowledge on network information, instrumentations SHOULD populate such attributes to the best of their knowledge when populate them at all. -`net.sock.family` identifies address family specified when connecting to the socket. For example, it matches `sa_family` field of `sockaddr` structure on [Linux](https://man7.org/linux/man-pages/man0/sys_socket.h.0p.html) and [Windows](https://docs.microsoft.com/windows/win32/api/winsock/ns-winsock-sockaddr). - _Note: Specific structures and methods to obtain socket-level attributes are mentioned here only as examples. Instrumentations would usually use Socket API provided by their environment or sockets implementations._ For IP-based communication, `server.socket.domain` represents either fully qualified domain name of immediate peer and `server.socket.address` to the IP address (or one specific to network family). @@ -224,7 +222,7 @@ Destination fields capture details about the receiver of a network exchange/pack **[1]:** This value may be a host name, a fully qualified domain name, or another host naming format. -### `network.connection.*` and `network.carrier.*` attributes +### Network connection and carrier attributes | Attribute | Type | Description | Examples | Requirement Level | @@ -273,6 +271,8 @@ Destination fields capture details about the receiver of a network exchange/pack | `lte_ca` | LTE CA | +For `Unix` and `pipe`, since the connection goes over the file system instead of being directly to a known peer, `server.address` is the only attribute that usually makes sense (see description of `server.address` below). + ## General remote service attributes This attribute may be used for any operation that accesses some remote service. From 8841dd7254b7ef9e7f19bb3cbed73f10b3553de5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 8 May 2023 17:09:17 -0700 Subject: [PATCH 21/22] Fix TODO --- semantic_conventions/trace/general.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index 63d3fbe7b33..5baf1001dd5 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -1,11 +1,11 @@ groups: - id: network-core - # TODO (trask) bring back prefix after https://github.com/open-telemetry/opentelemetry-specification/pull/3402 + prefix: network type: attribute_group brief: > These attributes may be used for any network related operation. attributes: - - id: network.transport + - id: transport type: allow_custom_values: true members: @@ -26,7 +26,7 @@ groups: [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). The value SHOULD be normalized to lowercase. examples: ['tcp', 'udp'] - - id: network.type + - id: type type: allow_custom_values: true members: @@ -40,13 +40,13 @@ groups: [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. examples: ['ipv4', 'ipv6'] - - id: network.protocol.name + - id: protocol.name type: string brief: > [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase. examples: ['amqp', 'http', 'mqtt'] - - id: network.protocol.version + - id: protocol.version type: string brief: 'Version of the application layer protocol used. See note below.' examples: '3.1.1' From d386acc3ed618166da85ae70eea9621aa3b69069 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 8 May 2023 17:32:14 -0700 Subject: [PATCH 22/22] Last post-merge fixes --- semantic_conventions/deprecated/network.yaml | 4 ++++ specification/metrics/semantic_conventions/rpc-metrics.md | 1 - specification/trace/semantic_conventions/database.md | 6 +++--- specification/trace/semantic_conventions/rpc.md | 2 -- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/semantic_conventions/deprecated/network.yaml b/semantic_conventions/deprecated/network.yaml index cae2d4ee7fd..17b75b90e3d 100644 --- a/semantic_conventions/deprecated/network.yaml +++ b/semantic_conventions/deprecated/network.yaml @@ -65,6 +65,10 @@ groups: - id: inproc value: "inproc" brief: 'In-process communication.' + note: > + Signals that there is only in-process communication not using a "real" network protocol + in cases where network attributes would normally be expected. Usually all other network + attributes can be left out in that case. - id: other value: "other" brief: 'Something else (non IP-based).' diff --git a/specification/metrics/semantic_conventions/rpc-metrics.md b/specification/metrics/semantic_conventions/rpc-metrics.md index 321f633527c..e47aa28fc99 100644 --- a/specification/metrics/semantic_conventions/rpc-metrics.md +++ b/specification/metrics/semantic_conventions/rpc-metrics.md @@ -132,7 +132,6 @@ To avoid high cardinality, implementations should prefer the most stable of `ser For client-side metrics `server.port` is required if the connection is IP-based and the port is available (it describes the server port they are connecting to). For server-side spans `server.port` is optional (it describes the port the client is connecting from). -Furthermore, setting [network.transport][] is required for non-IP connection like named pipe bindings. [network.transport]: ../../trace/semantic_conventions/span-general.md#network-attributes diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index d3d9eebf3ef..70e49f987ff 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -312,15 +312,15 @@ In addition to Cosmos DB attributes, all spans include In this example, Redis is connected using a unix domain socket and therefore the connection string and `server.address` are left out. Furthermore, `db.name` is not specified as there is no database name in Redis and `db.redis.database_index` is set instead. -| Key | Value | -| :------------------------ | :-------------------------------------------- | +| Key | Value | +|:--------------------------| :-------------------------------------------- | | Span name | `"HMSET myhash"` | | `db.system` | `"redis"` | | `db.connection_string` | not set | | `db.user` | not set | | `server.socket.address` | `"/tmp/redis.sock"` | | `network.transport` | `"Unix"` | - `db.name` | not set | +| `db.name` | not set | | `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` | | `db.operation` | not set | | `db.redis.database_index` | `15` | diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index 5a1b5c6cef6..e8ce49a5c9b 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -123,7 +123,6 @@ Examples of span names: For client-side spans `server.port` is required if the connection is IP-based and the port is available (it describes the server port they are connecting to). For server-side spans `client.socket.port` is optional (it describes the port the client is connecting from). -Furthermore, setting [network.transport][] is required for non-IP connection like named pipe bindings. #### Service name @@ -137,7 +136,6 @@ In this example, spans representing client request should have their `peer.servi Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service name. [network attributes]: span-general.md#server-and-client-attributes -[network.transport]: span-general.md#network-attributes [`service.name`]: ../../resource/semantic_conventions/README.md#service [`peer.service`]: span-general.md#general-remote-service-attributes