RPC

Remote Procedure Call (RPC) Attributes

This document defines attributes for remote procedure calls.

Attributes:

KeyStabilityValue TypeDescriptionExample Values
rpc.connect_rpc.error_codeDevelopmentstringThe error codes of the Connect request. Error codes are always string values.cancelled; unknown; invalid_argument
rpc.connect_rpc.request.metadata.<key>Developmentstring[]Connect request metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values. [1]["1.2.3.4", "1.2.3.5"]
rpc.connect_rpc.response.metadata.<key>Developmentstring[]Connect response metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2]["attribute_value"]
rpc.grpc.request.metadata.<key>Developmentstring[]gRPC request metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3]["1.2.3.4", "1.2.3.5"]
rpc.grpc.response.metadata.<key>Developmentstring[]gRPC response metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [4]["attribute_value"]
rpc.grpc.status_codeDevelopmentintThe numeric status code of the gRPC request.0; 1; 2
rpc.jsonrpc.error_codeDevelopmentinterror.code property of response if it is an error response.-32700; 100
rpc.jsonrpc.error_messageDevelopmentstringerror.message property of response if it is an error response.Parse error; User already exists
rpc.jsonrpc.request_idDevelopmentstringid 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; ``
rpc.jsonrpc.versionDevelopmentstringProtocol 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.0
rpc.message.compressed_sizeDevelopmentintCompressed size of the message in bytes.
rpc.message.idDevelopmentintMUST be calculated as two different counters starting from 1 one for sent messages and one for received message. [5]
rpc.message.typeDevelopmentstringWhether this is a received or sent message.SENT; RECEIVED
rpc.message.uncompressed_sizeDevelopmentintUncompressed size of the message in bytes.
rpc.methodDevelopmentstringThis is the logical name of the method from the RPC interface perspective.exampleMethod
rpc.serviceDevelopmentstringThe full (logical) name of the service being called, including its package name, if applicable.myservice.EchoService
rpc.systemDevelopmentstringA string identifying the remoting system. See below for a list of well-known identifiers.grpc; java_rmi; dotnet_wcf

[1] rpc.connect_rpc.request.metadata.<key>: 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 the rpc.connect_rpc.request.metadata.my-custom-key attribute with value ["1.2.3.4", "1.2.3.5"]

[2] rpc.connect_rpc.response.metadata.<key>: 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 the rpc.connect_rpc.response.metadata.my-custom-key attribute with value ["attribute_value"]

[3] rpc.grpc.request.metadata.<key>: 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.grpc.request.metadata.my-custom-key attribute with value ["1.2.3.4", "1.2.3.5"]

[4] rpc.grpc.response.metadata.<key>: 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 the rpc.grpc.response.metadata.my-custom-key attribute with value ["attribute_value"]

[5] rpc.message.id: This way we guarantee that the values will be consistent between different implementations.


rpc.connect_rpc.error_code 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
abortedabortedDevelopment
already_existsalready_existsDevelopment
cancelledcancelledDevelopment
data_lossdata_lossDevelopment
deadline_exceededdeadline_exceededDevelopment
failed_preconditionfailed_preconditionDevelopment
internalinternalDevelopment
invalid_argumentinvalid_argumentDevelopment
not_foundnot_foundDevelopment
out_of_rangeout_of_rangeDevelopment
permission_deniedpermission_deniedDevelopment
resource_exhaustedresource_exhaustedDevelopment
unauthenticatedunauthenticatedDevelopment
unavailableunavailableDevelopment
unimplementedunimplementedDevelopment
unknownunknownDevelopment

rpc.grpc.status_code 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
0OKDevelopment
1CANCELLEDDevelopment
2UNKNOWNDevelopment
3INVALID_ARGUMENTDevelopment
4DEADLINE_EXCEEDEDDevelopment
5NOT_FOUNDDevelopment
6ALREADY_EXISTSDevelopment
7PERMISSION_DENIEDDevelopment
8RESOURCE_EXHAUSTEDDevelopment
9FAILED_PRECONDITIONDevelopment
10ABORTEDDevelopment
11OUT_OF_RANGEDevelopment
12UNIMPLEMENTEDDevelopment
13INTERNALDevelopment
14UNAVAILABLEDevelopment
15DATA_LOSSDevelopment
16UNAUTHENTICATEDDevelopment

rpc.message.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.

ValueDescriptionStability
RECEIVEDreceivedDevelopment
SENTsentDevelopment

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
apache_dubboApache DubboDevelopment
connect_rpcConnect RPCDevelopment
dotnet_wcf.NET WCFDevelopment
grpcgRPCDevelopment
java_rmiJava RMIDevelopment
jsonrpcJSON-RPCDevelopment
onc_rpcONC RPC (Sun RPC)Development

Deprecated RPC Attributes

Deprecated rpc message attributes.

Attributes:

KeyStabilityValue TypeDescriptionExample Values
message.compressed_sizeDeprecated
Replaced by rpc.message.compressed_size.
intDeprecated, use rpc.message.compressed_size instead.
message.idDeprecated
Replaced by rpc.message.id.
intDeprecated, use rpc.message.id instead.
message.typeDeprecated
Replaced by rpc.message.type.
stringDeprecated, use rpc.message.type instead.SENT; RECEIVED
message.uncompressed_sizeDeprecated
Replaced by rpc.message.uncompressed_size.
intDeprecated, use rpc.message.uncompressed_size instead.

message.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.

ValueDescriptionStability
RECEIVEDreceivedDevelopment
SENTsentDevelopment