From d3a5bd4fd1c903fcdf9be51a51c0d3e439581bea Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 23 Feb 2022 09:25:16 -0800 Subject: [PATCH 1/5] Add table for well-known rpc systems --- semantic_conventions/trace/rpc.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/semantic_conventions/trace/rpc.yaml b/semantic_conventions/trace/rpc.yaml index 6b37a1fa93b..1fd12cde458 100644 --- a/semantic_conventions/trace/rpc.yaml +++ b/semantic_conventions/trace/rpc.yaml @@ -5,10 +5,20 @@ groups: events: [rpc.message] attributes: - id: system - type: string required: always - brief: 'A string identifying the remoting system.' - examples: ["grpc", "java_rmi", "wcf"] + brief: 'A string identifying the remoting system. See below for a list of well-known identifiers.' + type: + allow_custom_values: true + members: + - id: grpc + value: 'grpc' + brief: 'gRPC' + - id: java_rmi + value: 'java_rmi' + brief: 'Java RMI' + - id: wcf + value: 'wcf' + brief: 'WCF' - id: service type: string required: From 99c46694dd36ed5a79b547f40d2499984a37f3dc Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 23 Feb 2022 09:26:01 -0800 Subject: [PATCH 2/5] make table-generation --- specification/metrics/semantic_conventions/rpc.md | 10 +++++++++- specification/trace/semantic_conventions/rpc.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/specification/metrics/semantic_conventions/rpc.md b/specification/metrics/semantic_conventions/rpc.md index 12c6d57b939..9cbc2c62f8b 100644 --- a/specification/metrics/semantic_conventions/rpc.md +++ b/specification/metrics/semantic_conventions/rpc.md @@ -60,7 +60,7 @@ or not they should be on the server, client or both. | Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | +| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc` | Yes | | [`rpc.service`](../../trace/semantic_conventions/rpc.md) | string | The full (logical) name of the service being called, including its package name, if applicable. [1] | `myservice.EchoService` | No, but recommended | | [`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` | No, but recommended | | [`net.peer.ip`](../../trace/semantic_conventions/span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | @@ -76,6 +76,14 @@ or not they should be on the server, client or both. * [`net.peer.ip`](../../trace/semantic_conventions/span-general.md) * [`net.peer.name`](../../trace/semantic_conventions/span-general.md) + +`rpc.system` MUST be one of the following or, if none of the listed values apply, a custom value: + +| Value | Description | +|---|---| +| `grpc` | gRPC | +| `java_rmi` | Java RMI | +| `wcf` | WCF | To avoid high cardinality, implementations should prefer the most stable of `net.peer.name` or diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index 41853bbdba8..a6930962d49 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -56,7 +56,7 @@ Examples of span names: | Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `rpc.system` | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | +| `rpc.system` | string | A string identifying the remoting system. See below for a list of well-known identifiers. | `grpc` | Yes | | `rpc.service` | string | The full (logical) name of the service being called, including its package name, if applicable. [1] | `myservice.EchoService` | No, but recommended | | `rpc.method` | string | The name of the (logical) method being called, must be equal to the $method part in the span name. [2] | `exampleMethod` | No, but recommended | | [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | @@ -72,6 +72,14 @@ Examples of span names: * [`net.peer.ip`](span-general.md) * [`net.peer.name`](span-general.md) + +`rpc.system` MUST be one of the following or, if none of the listed values apply, a custom value: + +| Value | Description | +|---|---| +| `grpc` | gRPC | +| `java_rmi` | Java RMI | +| `wcf` | WCF | 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). From f63bb7fd3949949de70c8df1bd7cc2c004de3aea Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 23 Feb 2022 10:35:50 -0800 Subject: [PATCH 3/5] wcf -> dotnet_wcf --- semantic_conventions/trace/rpc.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/semantic_conventions/trace/rpc.yaml b/semantic_conventions/trace/rpc.yaml index 1fd12cde458..f87b5b29e53 100644 --- a/semantic_conventions/trace/rpc.yaml +++ b/semantic_conventions/trace/rpc.yaml @@ -16,9 +16,9 @@ groups: - id: java_rmi value: 'java_rmi' brief: 'Java RMI' - - id: wcf - value: 'wcf' - brief: 'WCF' + - id: dotnet_wcf + value: 'dotnet_wcf' + brief: '.NET WCF' - id: service type: string required: From c6b67a67e7e9ed4bfc035288ed2819c0cad51069 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 23 Feb 2022 10:38:46 -0800 Subject: [PATCH 4/5] make table-generation --- specification/metrics/semantic_conventions/rpc.md | 2 +- specification/trace/semantic_conventions/rpc.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/metrics/semantic_conventions/rpc.md b/specification/metrics/semantic_conventions/rpc.md index 9cbc2c62f8b..9c5efe3e8c4 100644 --- a/specification/metrics/semantic_conventions/rpc.md +++ b/specification/metrics/semantic_conventions/rpc.md @@ -83,7 +83,7 @@ or not they should be on the server, client or both. |---|---| | `grpc` | gRPC | | `java_rmi` | Java RMI | -| `wcf` | WCF | +| `dotnet_wcf` | .NET WCF | To avoid high cardinality, implementations should prefer the most stable of `net.peer.name` or diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index a6930962d49..67f835d68bb 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -79,7 +79,7 @@ Examples of span names: |---|---| | `grpc` | gRPC | | `java_rmi` | Java RMI | -| `wcf` | WCF | +| `dotnet_wcf` | .NET WCF | 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). From 63346751b6ee9a3f6b527a5fe6ecee3d8df931f5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 1 Mar 2022 09:57:48 -0800 Subject: [PATCH 5/5] Add change log --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 631a3ad3250..31a501a0a6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ release. ### Semantic Conventions +- Changed `rpc.system` to an enum (allowing custom values), and changed the + `rpc.system` value for .NET WCF from `wcf` to `dotnet_wcf`. + ([#2377](https://github.com/open-telemetry/opentelemetry-specification/pull/2377)) + ### Compatibility ### OpenTelemetry Protocol