diff --git a/.chloggen/rpc-method-service.yaml b/.chloggen/rpc-method-service.yaml
new file mode 100644
index 0000000000..ba8ec9e4e1
--- /dev/null
+++ b/.chloggen/rpc-method-service.yaml
@@ -0,0 +1,6 @@
+change_type: breaking
+component: rpc
+note: Merge `rpc.method` and `rpc.service` into fully-qualified `rpc.method`
+ attribute. Clarify how to handle possible high cardinality of `rpc.method`
+ in edge cases. Clarify `rpc.method` usage in span names.
+issues: [2863, 3196, 3223]
diff --git a/docs/cloud-providers/aws-sdk.md b/docs/cloud-providers/aws-sdk.md
index 34d2db5ef9..34e5785fb1 100644
--- a/docs/cloud-providers/aws-sdk.md
+++ b/docs/cloud-providers/aws-sdk.md
@@ -45,7 +45,7 @@ interesting conventions are found.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
diff --git a/docs/db/dynamodb.md b/docs/db/dynamodb.md
index f49277f6f6..7a9f6960e2 100644
--- a/docs/db/dynamodb.md
+++ b/docs/db/dynamodb.md
@@ -61,7 +61,7 @@ This span represents a `DynamoDB.BatchGetItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -112,7 +112,7 @@ This span represents a `DynamoDB.BatchWriteItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -167,7 +167,7 @@ This span represents a `DynamoDB.CreateTable` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -218,7 +218,7 @@ This span represents a `DynamoDB.DeleteItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -267,7 +267,7 @@ This span represents a `DynamoDB.DeleteTable` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -316,7 +316,7 @@ This span represents a `DynamoDB.DescribeTable` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -368,7 +368,7 @@ This span represents a `DynamoDB.GetItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -419,7 +419,7 @@ This span represents a `DynamoDB.ListTables` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -470,7 +470,7 @@ This span represents a `DynamoDB.PutItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -527,7 +527,7 @@ This span represents a `DynamoDB.Query` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -587,7 +587,7 @@ This span represents a `DynamoDB.Scan` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -638,7 +638,7 @@ This span represents a `DynamoDB.UpdateItem` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
@@ -692,7 +692,7 @@ This span represents a `DynamoDB.UpdateTable` call.
| [`aws.request_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. | `79b9da39-b7ae-508a-a6bc-864b2829c622`; `C9ER4AJX75574TDJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [1] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `cloud.region`:** Specifies the AWS Region that the SDK client targets for a given AWS service call. The attribute's value should adhere to the AWS Region codes outlined in the [AWS documentation](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#available-regions).
diff --git a/docs/object-stores/s3.md b/docs/object-stores/s3.md
index 4f353ebfcd..cd288bf0a7 100644
--- a/docs/object-stores/s3.md
+++ b/docs/object-stores/s3.md
@@ -34,7 +34,7 @@ Semantic Conventions for AWS S3 client spans extend the general [AWS SDK Semanti
| [`aws.s3.upload_id`](/docs/registry/attributes/aws.md) |  | `Recommended` | string | Upload ID that identifies the multipart upload. [6] | `dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ` |
| [`cloud.region`](/docs/registry/attributes/cloud.md) |  | `Recommended` | string | The AWS Region where the requested service is being accessed. [7] | `us-east-1`; `us-west-2` |
| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the operation corresponding to the request, as returned by the AWS SDK | `GetItem`; `PutItem` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
+| [`rpc.service`](/docs/registry/attributes/rpc.md) | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | `Recommended` | string | The name of the service to which a request is made, as returned by the AWS SDK. | `DynamoDB`; `S3` |
**[1] `aws.s3.bucket`:** The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.
This applies to almost all S3 operations except `list-buckets`.
diff --git a/docs/registry/attributes/rpc.md b/docs/registry/attributes/rpc.md
index 37fc8f6944..3a4d561725 100644
--- a/docs/registry/attributes/rpc.md
+++ b/docs/registry/attributes/rpc.md
@@ -18,16 +18,38 @@ This document defines attributes for remote procedure calls.
| `rpc.message.id` |  | int | MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. [1] | |
| `rpc.message.type` |  | string | Whether this is a received or sent message. | `SENT`; `RECEIVED` |
| `rpc.message.uncompressed_size` |  | int | Uncompressed size of the message in bytes. | |
-| `rpc.method` |  | string | This is the logical name of the method from the RPC interface perspective. [2] | `exampleMethod` |
+| `rpc.method` |  | string | The fully-qualified logical name of the method from the RPC interface perspective. [2] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| `rpc.method_original` |  | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
| `rpc.request.metadata.` |  | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [3] | `["1.2.3.4", "1.2.3.5"]` |
| `rpc.response.metadata.` |  | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [4] | `["attribute_value"]` |
| `rpc.response.status_code` |  | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| `rpc.service` |  | string | The full (logical) name of the service being called, including its package name, if applicable. [6] | `myservice.EchoService` |
-| `rpc.system.name` |  | string | The Remote Procedure Call (RPC) system. [7] | `grpc`; `dubbo`; `connectrpc` |
+| `rpc.system.name` |  | string | The Remote Procedure Call (RPC) system. [6] | `grpc`; `dubbo`; `connectrpc` |
**[1] `rpc.message.id`:** This way we guarantee that the values will be consistent between different implementations.
-**[2] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
+**[2] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
**[3] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
@@ -44,9 +66,7 @@ the `rpc.response.metadata.my-custom-key` attribute with value `["attribute_valu
**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[6] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
-**[7] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
+**[6] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
---
@@ -90,6 +110,7 @@ Deprecated rpc message attributes.
| `rpc.jsonrpc.error_message` | 
Use the span status description or `error.message` attribute on other signals. | string | Deprecated, use span status description or `error.message` attribute on other signals. | `Parse error`; `User already exists` |
| `rpc.jsonrpc.request_id` | 
Replaced by `jsonrpc.request.id`. | string | Deprecated, use `jsonrpc.request.id` instead. | `10`; `request-7`; `` |
| `rpc.jsonrpc.version` | 
Replaced by `jsonrpc.protocol.version`. | string | Deprecated, use `jsonrpc.protocol.version` instead. | `2.0`; `1.0` |
+| `rpc.service` | 
Value should be included in `rpc.method` which is expected to be a fully-qualified name. | string | Deprecated, use fully-qualified `rpc.method` instead. | `myservice.EchoService` |
| `rpc.system` | 
Replaced by `rpc.system.name`. | string | Deprecated, use `rpc.system.name` attribute instead. | `grpc`; `java_rmi`; `dotnet_wcf` |
---
diff --git a/docs/rpc/connect-rpc.md b/docs/rpc/connect-rpc.md
index a0cb253e48..c1fc0edc1f 100644
--- a/docs/rpc/connect-rpc.md
+++ b/docs/rpc/connect-rpc.md
@@ -36,17 +36,17 @@ document for details on how to record span status.
| --- | --- | --- | --- | --- | --- |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com//docs/protocol/#error-codes) of the Connect response. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [4] | int | Server port number. [5] | `80`; `8080`; `443` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com//docs/protocol/#error-codes) of the Connect response. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [7] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [9] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [10] | `myservice.EchoService` |
-| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [11] | `["1.2.3.4", "1.2.3.5"]` |
-| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [12] | `["attribute_value"]` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
+| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [10] | `["1.2.3.4", "1.2.3.5"]` |
+| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [11] | `["attribute_value"]` |
**[1] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
@@ -64,33 +64,53 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[3] `rpc.response.status_code`:** All error codes except `OK` SHOULD be considered errors.
+**[3] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
-**[4] `server.port`:** if the port is supported by the network transport used for communication.
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
-**[6] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
-**[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
-**[8] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[4] `rpc.response.status_code`:** All error codes except `OK` SHOULD be considered errors.
+
+**[5] `server.port`:** if the port is supported by the network transport used for communication.
+
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[9] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[10] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
-**[11] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[10] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
`rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
-**[12] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[11] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
@@ -100,7 +120,6 @@ The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
@@ -154,19 +173,19 @@ document for details on how to record span status.
| --- | --- | --- | --- | --- | --- |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com/docs/protocol/#error-codes) of the Connect response. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [4] | int | Server port number. [5] | `80`; `8080`; `443` |
-| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [6] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [7] | `65123` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The [error code](https://connectrpc.com/docs/protocol/#error-codes) of the Connect response. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [7] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [8] | `65123` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [8] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [9] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [10] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [11] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [12] | `myservice.EchoService` |
-| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [13] | `["1.2.3.4", "1.2.3.5"]` |
-| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [14] | `["attribute_value"]` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [9] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [10] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [11] | `tcp`; `udp` |
+| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [12] | `["1.2.3.4", "1.2.3.5"]` |
+| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [13] | `["attribute_value"]` |
**[1] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
@@ -184,7 +203,31 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[3] `rpc.response.status_code`:** The following error codes SHOULD be considered errors:
+**[3] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[4] `rpc.response.status_code`:** The following error codes SHOULD be considered errors:
- `unknown`
- `deadline_exceeded`
@@ -193,35 +236,31 @@ If the request has completed successfully, instrumentations SHOULD NOT set
- `unavailable`
- `data_loss`
-**[4] `server.port`:** if the port is supported by the network transport used for communication.
+**[5] `server.port`:** if the port is supported by the network transport used for communication.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[6] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
+**[7] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
-**[7] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
+**[8] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
-**[8] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[9] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[9] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[10] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[10] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[11] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[11] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[12] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
-**[13] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[12] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
`rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
-**[14] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[13] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
@@ -231,7 +270,6 @@ The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
diff --git a/docs/rpc/grpc.md b/docs/rpc/grpc.md
index 245e5e6b65..f2401dd51e 100644
--- a/docs/rpc/grpc.md
+++ b/docs/rpc/grpc.md
@@ -35,29 +35,49 @@ for the details on which values classify as errors.
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Required` | string | This is the logical name of the method from the RPC interface perspective. [1] | `exampleMethod` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The fully-qualified logical name of the method from the RPC interface perspective. [1] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server or generated by the client. [2] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The full (logical) name of the service being called, including its package name, if applicable. [3] | `myservice.EchoService` |
-| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [5] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [6] | int | Server port number. [7] | `80`; `8080`; `443` |
+| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [3] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [4] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [8] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [9] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [10] | `tcp`; `udp` |
-| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [11] | `["1.2.3.4", "1.2.3.5"]` |
-| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [12] | `["attribute_value"]` |
-
-**[1] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
+| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [10] | `["1.2.3.4", "1.2.3.5"]` |
+| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [11] | `["attribute_value"]` |
+
+**[1] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
**[2] `rpc.response.status_code`:** All status codes except `OK` SHOULD be considered errors.
-**[3] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
-**[4] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
+**[3] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
-**[5] `error.type`:** If the RPC fails with an error before status code is returned,
+**[4] `error.type`:** If the RPC fails with an error before status code is returned,
`error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable)
or a component-specific, low cardinality error identifier.
@@ -71,27 +91,27 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[6] `server.port`:** if the port is supported by the network transport used for communication.
+**[5] `server.port`:** if the port is supported by the network transport used for communication.
-**[7] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[8] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[9] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[10] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[11] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[10] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
`rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
-**[12] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[11] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
@@ -101,7 +121,6 @@ The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
@@ -157,18 +176,18 @@ for the details on which values classify as errors.
| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The string representation of the [status code](https://github.com/grpc/grpc/blob/v1.75.0/doc/statuscodes.md) returned by the server. [1] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [4] | int | Server port number. [5] | `80`; `8080`; `443` |
-| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [6] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [7] | `65123` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [7] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [8] | `65123` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [8] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [9] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [10] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [11] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [12] | `myservice.EchoService` |
-| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [13] | `["1.2.3.4", "1.2.3.5"]` |
-| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [14] | `["attribute_value"]` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [9] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [10] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [11] | `tcp`; `udp` |
+| [`rpc.request.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [12] | `["1.2.3.4", "1.2.3.5"]` |
+| [`rpc.response.metadata.`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string[] | RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. [13] | `["attribute_value"]` |
**[1] `rpc.response.status_code`:** The following status codes SHOULD be considered errors:
@@ -195,35 +214,55 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `server.port`:** if the port is supported by the network transport used for communication.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
-**[6] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
+**[5] `server.port`:** if the port is supported by the network transport used for communication.
-**[7] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[8] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
-**[9] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
-**[10] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+
+**[10] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+
+**[11] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[11] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[12] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
-**[13] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[12] `rpc.request.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` SHOULD be recorded as
`rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]`
-**[14] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
+**[13] `rpc.response.metadata.`:** Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.
Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.
For example, a property `my-custom-key` with value `["attribute_value"]` SHOULD be recorded as
@@ -233,7 +272,6 @@ The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
diff --git a/docs/rpc/json-rpc.md b/docs/rpc/json-rpc.md
index 5dd6ae0d23..9805e6f306 100644
--- a/docs/rpc/json-rpc.md
+++ b/docs/rpc/json-rpc.md
@@ -36,24 +36,23 @@ are considered errors.
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Required` | string | This is the logical name of the method from the RPC interface perspective. [1] | `exampleMethod` |
-| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
+| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
| [`jsonrpc.protocol.version`](/docs/registry/attributes/jsonrpc.md) |  | `Conditionally Required` If other than the default version (`1.0`) | string | Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. | `2.0`; `1.0` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response if it is an error response recorded as a string. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
-| [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) |  | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [7] | `10`; `request-7` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response if it is an error response recorded as a string. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [4] | int | Server port number. [5] | `80`; `8080`; `443` |
+| [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) |  | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [6] | `10`; `request-7` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [8] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [9] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [10] | `tcp`; `udp` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string | JSON-RPC method name provided in the request. [10] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
-**[1] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
+**[1] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
-**[2] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
-
-**[3] `error.type`:** If the RPC fails with an error before status code is returned,
+**[2] `error.type`:** If the RPC fails with an error before status code is returned,
`error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable)
or a component-specific, low cardinality error identifier.
@@ -67,25 +66,28 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors.
+**[3] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors.
-**[5] `server.port`:** if the port is supported by the network transport used for communication.
+**[4] `server.port`:** if the port is supported by the network transport used for communication.
-**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[7] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged.
+**[6] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged.
Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or omitted.
-**[8] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[9] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[10] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
+**[10] `rpc.method`:** JSON-RPC supports sending and receiving arbitrary method names without prior registration or definition. As a result, the method name MAY have unbounded cardinality in edge or error cases.
+General-purpose JSON-RPC instrumentations therefore SHOULD NOT set this attribute by default and SHOULD provide a way to configure the list of recognized RPC methods. When tracing instrumentation converts RPC method to `_OTHER`, it MUST also set `rpc.method_original` span attribute to the original value.
+
The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
@@ -143,26 +145,25 @@ are considered errors.
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Required` | string | This is the logical name of the method from the RPC interface perspective. [1] | `exampleMethod` |
-| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
+| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
| [`jsonrpc.protocol.version`](/docs/registry/attributes/jsonrpc.md) |  | `Conditionally Required` If other than the default version (`1.0`) | string | Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. | `2.0`; `1.0` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response recorded as a string. [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
-| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [7] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [8] | `65123` |
-| [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) |  | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [9] | `10`; `request-7` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` when available | string | The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of response recorded as a string. [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [4] | int | Server port number. [5] | `80`; `8080`; `443` |
+| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [6] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [7] | `65123` |
+| [`jsonrpc.request.id`](/docs/registry/attributes/jsonrpc.md) |  | `Recommended` | string | A string representation of the `id` property of the request and its corresponding response. [8] | `10`; `request-7` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [10] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [11] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [12] | `tcp`; `udp` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [9] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [10] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [11] | `tcp`; `udp` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Opt-In` | string | JSON-RPC method name provided in the request. [12] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
-**[1] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
+**[1] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
-**[2] `server.address`:** May contain server IP address, DNS name, or local socket name. When host component is an IP address, instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set `server.address` to the IP address provided in the host component.
-
-**[3] `error.type`:** If the RPC fails with an error before status code is returned,
+**[2] `error.type`:** If the RPC fails with an error before status code is returned,
`error.type` SHOULD be set to the exception type (its fully-qualified class name, if applicable)
or a component-specific, low cardinality error identifier.
@@ -176,29 +177,32 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors.
+**[3] `rpc.response.status_code`:** All JSON RPC error codes SHOULD be considered errors.
-**[5] `server.port`:** if the port is supported by the network transport used for communication.
+**[4] `server.port`:** if the port is supported by the network transport used for communication.
-**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[7] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
+**[6] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
-**[8] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
+**[7] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
-**[9] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged.
+**[8] `jsonrpc.request.id`:** Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged.
Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or omitted.
-**[10] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[9] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[11] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[10] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[12] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[11] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
+**[12] `rpc.method`:** JSON-RPC supports sending and receiving arbitrary method names without prior registration or definition. As a result, the method name MAY have unbounded cardinality in edge or error cases.
+General-purpose JSON-RPC instrumentations therefore SHOULD NOT set this attribute by default and SHOULD provide a way to configure the list of recognized RPC methods. When tracing instrumentation converts RPC method to `_OTHER`, it MUST also set `rpc.method_original` span attribute to the original value.
+
The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
diff --git a/docs/rpc/rpc-metrics.md b/docs/rpc/rpc-metrics.md
index 67f7353433..e23a5425aa 100644
--- a/docs/rpc/rpc-metrics.md
+++ b/docs/rpc/rpc-metrics.md
@@ -89,12 +89,11 @@ SHOULD be the same as the RPC server span duration.
| --- | --- | --- | --- | --- | --- |
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [4] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [5] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [7] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [8] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [5] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [6] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [7] | `tcp`; `udp` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Opt-In` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`server.port`](/docs/registry/attributes/server.md) |  | `Opt-In` | int | Server port number. | `80`; `8080`; `443` |
@@ -114,23 +113,43 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[3] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[3] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[4] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[5] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[6] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[6] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[7] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[7] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[8] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
@@ -187,12 +206,11 @@ This metric is [recommended][MetricRecommended].
| --- | --- | --- | --- | --- | --- |
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [4] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [5] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [7] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [8] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [5] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [6] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [7] | `tcp`; `udp` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Opt-In` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`server.port`](/docs/registry/attributes/server.md) |  | `Opt-In` | int | Server port number. | `80`; `8080`; `443` |
@@ -212,23 +230,43 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[3] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[3] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[4] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[5] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[6] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[6] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[7] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[7] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[8] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
@@ -285,12 +323,11 @@ This metric is [recommended][MetricRecommended].
| --- | --- | --- | --- | --- | --- |
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [2] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [3] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [4] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [5] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [6] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [7] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [8] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [3] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [5] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [6] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [7] | `tcp`; `udp` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Opt-In` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`server.port`](/docs/registry/attributes/server.md) |  | `Opt-In` | int | Server port number. | `80`; `8080`; `443` |
@@ -310,23 +347,43 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[3] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[3] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[4] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[5] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[5] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[6] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[6] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[7] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[7] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[8] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
@@ -393,13 +450,12 @@ SHOULD be the same as the RPC client span duration.
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [5] | `80`; `8080`; `443` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [7] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [9] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [10] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
**[1] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
@@ -419,25 +475,45 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[6] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[8] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[9] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[10] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
@@ -495,13 +571,12 @@ This metric is [recommended][MetricRecommended].
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [5] | `80`; `8080`; `443` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [7] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [9] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [10] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
**[1] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
@@ -521,25 +596,45 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[6] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[8] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[9] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[10] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
@@ -597,13 +692,12 @@ This metric is [recommended][MetricRecommended].
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [5] | `80`; `8080`; `443` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [6] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [7] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [8] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [9] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [10] | `myservice.EchoService` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` If applicable. | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
**[1] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
@@ -623,25 +717,45 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[6] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[7] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[8] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[9] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[10] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
---
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
diff --git a/docs/rpc/rpc-spans.md b/docs/rpc/rpc-spans.md
index c7d7b9331d..1ab2b97e9c 100644
--- a/docs/rpc/rpc-spans.md
+++ b/docs/rpc/rpc-spans.md
@@ -13,7 +13,6 @@ This document defines how to describe remote procedure calls
- [Common remote procedure call conventions](#common-remote-procedure-call-conventions)
- [Span name](#span-name)
- - [Service name](#service-name)
- [RPC client span](#rpc-client-span)
- [RPC server span](#rpc-server-span)
- [Events](#events)
@@ -52,37 +51,16 @@ This document defines how to describe remote procedure calls
### Span name
-The *span name* MUST be the full RPC method name formatted as:
+RPC spans MUST follow the overall [guidelines for span names](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.52.0/specification/trace/api.md#span).
-```
-$package.$service/$method
-```
+The *span name* SHOULD be `{rpc.method}` if it is available and not set to
+`_OTHER`.
-(where $service MUST NOT contain dots and $method MUST NOT contain slashes)
+If `rpc.method` is unavailable or set to `_OTHER`, the span name SHOULD be
+`{rpc.system.name}`.
-If there is no package name or if it is unknown, the `$package.` part (including the period) is omitted.
-
-Examples of span names:
-
-- `grpc.test.EchoService/Echo`
-- `com.example.ExampleRmiService/exampleMethod`
-- `MyCalcService.Calculator/Add` reported by the server and
- `MyServiceReference.ICalculator/Add` reported by the client for .NET WCF calls
-- `MyServiceWithNoPackage/theMethod`
-
-### Service name
-
-On the server process receiving and handling the remote procedure call, the service name provided in `rpc.service` does not necessarily have to match the [`service.name`][] resource attribute.
-One process can expose multiple RPC endpoints and thus have multiple RPC service names. From a deployment perspective, as expressed by the `service.*` resource attributes, it will be treated as one deployed service with one `service.name`.
-Likewise, on clients sending RPC requests to a server, the service name provided in `rpc.service` does not have to match the [`peer.service`][] span attribute.
-
-As an example, given a process deployed as `QuoteService`, this would be the name that goes into the `service.name` resource attribute which applies to the entire process.
-This process could expose two RPC endpoints, one called `CurrencyQuotes` (= `rpc.service`) with a method called `getMeanRate` (= `rpc.method`) and the other endpoint called `StockQuotes` (= `rpc.service`) with two methods `getCurrentBid` and `getLastClose` (= `rpc.method`).
-In this example, spans representing client request should have their `peer.service` attribute set to `QuoteService` as well to match the server's `service.name` resource attribute.
-Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service name.
-
-[`service.name`]: /docs/resource/README.md#service
-[`peer.service`]: /docs/general/attributes.md#general-remote-service-attributes
+Semantic conventions for individual RPC systems MAY specify different span name
+format.
### RPC client span
@@ -119,15 +97,15 @@ document for details on how to record span status.
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [6] | int | Server port number. [7] | `80`; `8080`; `443` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [7] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [8] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [9] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [10] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [11] | `myservice.EchoService` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [8] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [9] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [10] | `tcp`; `udp` |
**[1] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
@@ -147,32 +125,51 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[5] `server.port`:** if the port is supported by the network transport used for communication.
+**[6] `server.port`:** if the port is supported by the network transport used for communication.
-**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[7] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[7] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[8] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[8] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[9] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[9] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[10] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[10] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[11] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`rpc.system.name`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
@@ -244,17 +241,17 @@ document for details on how to record span status.
| [`rpc.system.name`](/docs/registry/attributes/rpc.md) |  | `Required` | string | The Remote Procedure Call (RPC) system. [1] | `grpc`; `dubbo`; `connectrpc` |
| [`server.address`](/docs/registry/attributes/server.md) |  | `Required` | string | RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html). [2] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| [`error.type`](/docs/registry/attributes/error.md) |  | `Conditionally Required` If and only if the operation failed. | string | Describes a class of error the operation ended with. [3] | `DEADLINE_EXCEEDED`; `java.net.UnknownHostException`; `-32602` |
-| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [4] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
-| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [5] | int | Server port number. [6] | `80`; `8080`; `443` |
-| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [7] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
-| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [8] | `65123` |
+| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | The fully-qualified logical name of the method from the RPC interface perspective. [4] | `com.example.ExampleService/exampleMethod`; `EchoService/Echo`; `_OTHER` |
+| [`rpc.method_original`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` If and only if it's different than `rpc.method`. | string | The original name of the method used by the client. | `com.myservice.EchoService/catchAll`; `com.myservice.EchoService/unknownMethod`; `InvalidMethod` |
+| [`rpc.response.status_code`](/docs/registry/attributes/rpc.md) |  | `Conditionally Required` if available. | string | Status code of the RPC returned by the RPC server or generated by the client [5] | `OK`; `DEADLINE_EXCEEDED`; `-32602` |
+| [`server.port`](/docs/registry/attributes/server.md) |  | `Conditionally Required` [6] | int | Server port number. [7] | `80`; `8080`; `443` |
+| [`client.address`](/docs/registry/attributes/client.md) |  | `Recommended` | string | Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [8] | `client.example.com`; `10.1.2.80`; `/tmp/my.sock` |
+| [`client.port`](/docs/registry/attributes/client.md) |  | `Recommended` | int | Client port number. [9] | `65123` |
| [`network.peer.address`](/docs/registry/attributes/network.md) |  | `Recommended` | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` |
| [`network.peer.port`](/docs/registry/attributes/network.md) |  | `Recommended` If `network.peer.address` is set. | int | Peer port number of the network connection. | `65123` |
-| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [9] | `http` |
-| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [10] | `1.1`; `2` |
-| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [11] | `tcp`; `udp` |
-| [`rpc.method`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | This is the logical name of the method from the RPC interface perspective. [12] | `exampleMethod` |
-| [`rpc.service`](/docs/registry/attributes/rpc.md) |  | `Recommended` | string | The full (logical) name of the service being called, including its package name, if applicable. [13] | `myservice.EchoService` |
+| [`network.protocol.name`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. [10] | `http` |
+| [`network.protocol.version`](/docs/registry/attributes/network.md) |  | `Recommended` | string | The actual version of the protocol used for network communication. [11] | `1.1`; `2` |
+| [`network.transport`](/docs/registry/attributes/network.md) |  | `Recommended` | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [12] | `tcp`; `udp` |
**[1] `rpc.system.name`:** The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
@@ -274,36 +271,55 @@ Instrumentations SHOULD document the list of errors they report.
If the request has completed successfully, instrumentations SHOULD NOT set
`error.type`.
-**[4] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
+**[4] `rpc.method`:** The method name MAY have unbounded cardinality in edge or error cases.
+
+Some RPC frameworks or libraries provide a fixed set of recognized methods
+for client stubs and server implementations. Instrumentations for such
+frameworks MUST set this attribute to the original method name only
+when the method is recognized by the framework or library.
+
+When the method is not recognized, for example, when the server receives
+a request for a method that is not predefined on the server, or when
+instrumentation is not able to reliably detect if the method is predefined,
+the attribute MUST be set to `_OTHER`. In such cases, tracing
+instrumentations MUST also set `rpc.method_original` attribute to
+the original method value.
+
+If the RPC instrumentation could end up converting valid RPC methods to
+`_OTHER`, then it SHOULD provide a way to configure the list of recognized
+RPC methods.
+
+The `rpc.method` can be different from the name of any implementing
+method/function.
+The `code.function.name` attribute may be used to record the fully-qualified
+method actually executing the call on the server side, or the
+RPC client stub method on the client side.
+
+**[5] `rpc.response.status_code`:** Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
Semantic conventions for individual RPC frameworks SHOULD document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors.
-**[5] `server.port`:** if the port is supported by the network transport used for communication.
+**[6] `server.port`:** if the port is supported by the network transport used for communication.
-**[6] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
+**[7] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
-**[7] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
+**[8] `client.address`:** When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
-**[8] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
+**[9] `client.port`:** When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
-**[9] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
+**[10] `network.protocol.name`:** The value SHOULD be normalized to lowercase.
-**[10] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
+**[11] `network.protocol.version`:** If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
-**[11] `network.transport`:** The value SHOULD be normalized to lowercase.
+**[12] `network.transport`:** The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
-**[12] `rpc.method`:** This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub method on the client side.
-
-**[13] `rpc.service`:** 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.function.name` attribute may be used to record the fully-qualified method actually executing the call on the server side, or the RPC client stub class on the client side.
-
The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`rpc.method`](/docs/registry/attributes/rpc.md)
-* [`rpc.service`](/docs/registry/attributes/rpc.md)
* [`rpc.system.name`](/docs/registry/attributes/rpc.md)
* [`server.address`](/docs/registry/attributes/server.md)
* [`server.port`](/docs/registry/attributes/server.md)
diff --git a/model/rpc/common.yaml b/model/rpc/common.yaml
index 2d34805920..7a9b829068 100644
--- a/model/rpc/common.yaml
+++ b/model/rpc/common.yaml
@@ -4,7 +4,6 @@ groups:
brief: 'Common attributes for RPC spans and metrics.'
attributes:
- ref: rpc.method
- requirement_level: recommended
- ref: server.address
requirement_level: required
brief: >
diff --git a/model/rpc/deprecated/registry-deprecated.yaml b/model/rpc/deprecated/registry-deprecated.yaml
index 8b19c6cb49..edd332ff08 100644
--- a/model/rpc/deprecated/registry-deprecated.yaml
+++ b/model/rpc/deprecated/registry-deprecated.yaml
@@ -275,3 +275,12 @@ groups:
renamed_to: "jsonrpc.protocol.version"
brief: 'Deprecated, use `jsonrpc.protocol.version` instead.'
examples: ['2.0', '1.0']
+ - id: rpc.service
+ type: string
+ stability: development
+ brief: 'Deprecated, use fully-qualified `rpc.method` instead.'
+ examples: "myservice.EchoService"
+ deprecated:
+ reason: uncategorized
+ note: 'Value should be included in `rpc.method` which is expected
+ to be a fully-qualified name.'
diff --git a/model/rpc/metrics.yaml b/model/rpc/metrics.yaml
index f1d1d6c928..17983067c4 100644
--- a/model/rpc/metrics.yaml
+++ b/model/rpc/metrics.yaml
@@ -6,12 +6,15 @@ groups:
attributes:
- ref: rpc.system.name
requirement_level: required
- - ref: rpc.service
- ref: server.address
requirement_level: required
- ref: server.port
requirement_level:
conditionally_required: If applicable.
+ - ref: rpc.method
+ requirement_level:
+ conditionally_required: if available.
+
- id: attributes.metrics.rpc.server
type: attribute_group
brief: "Describes RPC metric attributes."
@@ -25,6 +28,10 @@ groups:
- ref: server.port
note: ""
requirement_level: opt_in
+ - ref: rpc.method
+ requirement_level:
+ conditionally_required: if available.
+
# RPC Server metrics
- id: metric.rpc.server.call.duration
type: metric
diff --git a/model/rpc/registry.yaml b/model/rpc/registry.yaml
index 6b1f5683d5..05baa9e779 100644
--- a/model/rpc/registry.yaml
+++ b/model/rpc/registry.yaml
@@ -43,25 +43,45 @@ groups:
- id: rpc.method
type: string
stability: development
- brief: This is the logical name of the method from the RPC interface perspective.
- examples: "exampleMethod"
- note: >
- This is the logical name of the method from the RPC interface perspective,
- which can be different from the name of any implementing method/function.
+ brief: The fully-qualified logical name of the method from the RPC
+ interface perspective.
+ examples:
+ - "com.example.ExampleService/exampleMethod"
+ - "EchoService/Echo"
+ - "_OTHER"
+ note: |
+ The method name MAY have unbounded cardinality in edge or error cases.
+
+ Some RPC frameworks or libraries provide a fixed set of recognized methods
+ for client stubs and server implementations. Instrumentations for such
+ frameworks MUST set this attribute to the original method name only
+ when the method is recognized by the framework or library.
+
+ When the method is not recognized, for example, when the server receives
+ a request for a method that is not predefined on the server, or when
+ instrumentation is not able to reliably detect if the method is predefined,
+ the attribute MUST be set to `_OTHER`. In such cases, tracing
+ instrumentations MUST also set `rpc.method_original` attribute to
+ the original method value.
+
+ If the RPC instrumentation could end up converting valid RPC methods to
+ `_OTHER`, then it SHOULD provide a way to configure the list of recognized
+ RPC methods.
+
+ The `rpc.method` can be different from the name of any implementing
+ method/function.
The `code.function.name` attribute may be used to record the fully-qualified
method actually executing the call on the server side, or the
RPC client stub method on the client side.
- - id: rpc.service
+ - id: rpc.method_original
type: string
stability: development
- brief: 'The full (logical) name of the service being called, including its package name, if applicable.'
- examples: "myservice.EchoService"
- note: >
- 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.function.name` attribute may be used to record the fully-qualified
- method actually executing the call on the server side, or the
- RPC client stub class on the client side.
+ brief: >
+ The original name of the method used by the client.
+ examples:
+ - "com.myservice.EchoService/catchAll"
+ - "com.myservice.EchoService/unknownMethod"
+ - "InvalidMethod"
- id: rpc.system.name
brief: 'The Remote Procedure Call (RPC) system.'
note: >
diff --git a/model/rpc/spans.yaml b/model/rpc/spans.yaml
index e3fdc8f172..e223eab826 100644
--- a/model/rpc/spans.yaml
+++ b/model/rpc/spans.yaml
@@ -5,8 +5,6 @@ groups:
brief: 'This document defines semantic conventions for remote procedure calls.'
extends: common.rpc.attributes
attributes:
- - ref: rpc.method
- sampling_relevant: true
- ref: server.address
sampling_relevant: true
- ref: server.port
@@ -16,6 +14,13 @@ groups:
- ref: network.peer.port
requirement_level:
recommended: If `network.peer.address` is set.
+ - ref: rpc.method
+ requirement_level:
+ conditionally_required: if available.
+ sampling_relevant: true
+ - ref: rpc.method_original
+ requirement_level:
+ conditionally_required: If and only if it's different than `rpc.method`.
- id: rpc.server
type: attribute_group
@@ -27,19 +32,6 @@ groups:
- ref: client.port
requirement_level: recommended
- - id: rpc_service.server
- type: attribute_group
- brief: 'This document defines semantic conventions for remote procedure calls.'
- extends: rpc
- attributes:
- - ref: client.address
- requirement_level: recommended
- - ref: client.port
- requirement_level: recommended
- - ref: rpc.service
- requirement_level: recommended
- sampling_relevant: true
-
- id: span.rpc.call.client
type: span
stability: development
@@ -68,13 +60,11 @@ groups:
- ref: rpc.system.name
requirement_level: required
sampling_relevant: true
- - ref: rpc.service
- sampling_relevant: true
- id: span.rpc.call.server
type: span
stability: development
- extends: rpc_service.server
+ extends: rpc.server
span_kind: server
brief: This span represents an incoming Remote Procedure Call (RPC).
events: [rpc.message]
@@ -123,13 +113,11 @@ groups:
requirement_level: opt_in
- ref: rpc.response.metadata
requirement_level: opt_in
- - ref: rpc.service
- sampling_relevant: true
- id: span.rpc.connect_rpc.call.server
type: span
stability: development
- extends: rpc_service.server
+ extends: rpc.server
span_kind: server
brief: This span represents an incoming Remote Procedure Call (RPC).
note: |
@@ -179,9 +167,6 @@ groups:
attributes:
- ref: rpc.method
requirement_level: required
- - ref: rpc.service
- requirement_level: required
- sampling_relevant: true
- ref: rpc.response.status_code
requirement_level: required
brief: >
@@ -197,7 +182,7 @@ groups:
- id: span.rpc.grpc.call.server
type: span
stability: development
- extends: rpc_service.server
+ extends: rpc.server
span_kind: server
brief: This span represents an incoming Remote Procedure Call (RPC).
note: |
@@ -249,13 +234,24 @@ groups:
extends: rpc
span_kind: client
attributes:
- - ref: rpc.method
- requirement_level: required
- ref: jsonrpc.protocol.version
requirement_level:
conditionally_required: If other than the default version (`1.0`)
- ref: jsonrpc.request.id
requirement_level: recommended
+ - ref: rpc.method
+ brief: JSON-RPC method name provided in the request.
+ note: >
+ JSON-RPC supports sending and receiving arbitrary method names without
+ prior registration or definition. As a result, the method name MAY have
+ unbounded cardinality in edge or error cases.
+
+ General-purpose JSON-RPC instrumentations therefore SHOULD NOT set this
+ attribute by default and SHOULD provide a way to configure the list of
+ recognized RPC methods.
+ When tracing instrumentation converts RPC method to `_OTHER`, it MUST
+ also set `rpc.method_original` span attribute to the original value.
+ requirement_level: opt_in
- ref: rpc.response.status_code
brief: >
The [`error.code`](https://www.jsonrpc.org/specification#error_object)
@@ -283,13 +279,24 @@ groups:
an [`error` object](https://www.jsonrpc.org/specification#error_object)
are considered errors.
attributes:
- - ref: rpc.method
- requirement_level: required
- ref: jsonrpc.protocol.version
requirement_level:
conditionally_required: If other than the default version (`1.0`)
- ref: jsonrpc.request.id
requirement_level: recommended
+ - ref: rpc.method
+ brief: JSON-RPC method name provided in the request.
+ note: >
+ JSON-RPC supports sending and receiving arbitrary method names without
+ prior registration or definition. As a result, the method name MAY have
+ unbounded cardinality in edge or error cases.
+
+ General-purpose JSON-RPC instrumentations therefore SHOULD NOT set this
+ attribute by default and SHOULD provide a way to configure the list of
+ recognized RPC methods.
+ When tracing instrumentation converts RPC method to `_OTHER`, it MUST
+ also set `rpc.method_original` span attribute to the original value.
+ requirement_level: opt_in
- ref: rpc.response.status_code
brief: >
The [`error.code`](https://www.jsonrpc.org/specification#error_object) property of