RPC

RPC Attributes

RPC attributes are intended to be used in the context of events related to remote procedure calls (RPC).

AttributeTypeDescriptionExamplesStability
rpc.connect_rpc.error_codestringThe error codes of the Connect request. Error codes are always string values.cancelledExperimental
rpc.connect_rpc.request.metadata.<key>string[]Connect request metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values. [1]rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]Experimental
rpc.connect_rpc.response.metadata.<key>string[]Connect response metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2]rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]Experimental
rpc.grpc.request.metadata.<key>string[]gRPC request metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3]rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]Experimental
rpc.grpc.response.metadata.<key>string[]gRPC response metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [4]rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]Experimental
rpc.grpc.status_codeintThe numeric status code of the gRPC request.0Experimental
rpc.jsonrpc.error_codeinterror.code property of response if it is an error response.-32700; 100Experimental
rpc.jsonrpc.error_messagestringerror.message property of response if it is an error response.Parse error; User already existsExperimental
rpc.jsonrpc.request_idstringid property of request or response. Since protocol allows id to be int, string, null or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of null value. Omit entirely if this is a notification.10; request-7; ``Experimental
rpc.jsonrpc.versionstringProtocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 doesn’t specify this, the value can be omitted.2.0; 1.0Experimental
rpc.methodstringThe name of the (logical) method being called, must be equal to the $method part in the span name. [5]exampleMethodExperimental
rpc.servicestringThe full (logical) name of the service being called, including its package name, if applicable. [6]myservice.EchoServiceExperimental
rpc.systemstringA string identifying the remoting system. See below for a list of well-known identifiers.grpcExperimental

[1]: 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.

[2]: 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.

[3]: 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.

[4]: 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.

[5]: 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 attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).

[6]: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The code.namespace attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).

rpc.connect_rpc.error_code MUST be one of the following:

ValueDescriptionStability
cancelledcancelledExperimental
unknownunknownExperimental
invalid_argumentinvalid_argumentExperimental
deadline_exceededdeadline_exceededExperimental
not_foundnot_foundExperimental
already_existsalready_existsExperimental
permission_deniedpermission_deniedExperimental
resource_exhaustedresource_exhaustedExperimental
failed_preconditionfailed_preconditionExperimental
abortedabortedExperimental
out_of_rangeout_of_rangeExperimental
unimplementedunimplementedExperimental
internalinternalExperimental
unavailableunavailableExperimental
data_lossdata_lossExperimental
unauthenticatedunauthenticatedExperimental

rpc.grpc.status_code MUST be one of the following:

ValueDescriptionStability
0OKExperimental
1CANCELLEDExperimental
2UNKNOWNExperimental
3INVALID_ARGUMENTExperimental
4DEADLINE_EXCEEDEDExperimental
5NOT_FOUNDExperimental
6ALREADY_EXISTSExperimental
7PERMISSION_DENIEDExperimental
8RESOURCE_EXHAUSTEDExperimental
9FAILED_PRECONDITIONExperimental
10ABORTEDExperimental
11OUT_OF_RANGEExperimental
12UNIMPLEMENTEDExperimental
13INTERNALExperimental
14UNAVAILABLEExperimental
15DATA_LOSSExperimental
16UNAUTHENTICATEDExperimental

rpc.system has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
grpcgRPCExperimental
java_rmiJava RMIExperimental
dotnet_wcf.NET WCFExperimental
apache_dubboApache DubboExperimental
connect_rpcConnect RPCExperimental