What do the rpc.* and jsonrpc.* attributes describe?
A call to an Ethereum node is JSON-RPC: eth_sendRawTransaction, eth_getTransactionReceipt and so on. Under the RPC conventions, each call is a CLIENT span named after rpc.method, with rpc.system.name set to jsonrpc.
If the method is unknown, rpc.method is _OTHER and the span is named after rpc.system.name instead. An error response puts its error.code in rpc.response.status_code, as a string.
Should a JSON-RPC client record rpc.method?
The JSON-RPC conventions say a general-purpose instrumentation SHOULD NOT set rpc.method by default, because a server can be sent any method name. They make it opt-in.
hashspan records it on every JSON-RPC span its viem transport creates, with the span named after the method. A name that is not a plain identifier (a letter, then up to 63 letters, digits or underscores) goes in as _OTHER, and the span is then named jsonrpc, its rpc.system.name (since hashspan 1.3).
All 6 rpc.* attributes
stringRelease candidate
The fully-qualified logical name of the method from the RPC interface perspective.
Examples com.example.ExampleService/exampleMethod, EchoService/Echo, _OTHER
Set on{rpc.method} CLIENT: rpc.call.client (conditionally required), rpc.connect_rpc.call.client (conditionally required), rpc.grpc.call.client (required), rpc.jsonrpc.call.client (opt-in), rpc.dubbo.call.client (required){rpc.method} SERVER: rpc.call.server (conditionally required), rpc.connect_rpc.call.server (conditionally required), rpc.grpc.call.server (conditionally required), rpc.jsonrpc.call.server (opt-in), rpc.dubbo.call.server (conditionally required)
Official definition
stringRelease candidate
The original name of the method used by the client.
Examples com.myservice.EchoService/catchAll, com.myservice.EchoService/unknownMethod, InvalidMethod
Set on{rpc.method} CLIENT: rpc.call.client (conditionally required), rpc.connect_rpc.call.client (conditionally required), rpc.grpc.call.client (conditionally required), rpc.jsonrpc.call.client (conditionally required), rpc.dubbo.call.client (conditionally required){rpc.method} SERVER: rpc.call.server (conditionally required), rpc.connect_rpc.call.server (conditionally required), rpc.grpc.call.server (conditionally required), rpc.jsonrpc.call.server (conditionally required), rpc.dubbo.call.server (conditionally required)
Official definition
string[]Development
RPC request metadata, <key> being the normalized RPC metadata key (lowercase), the value being the metadata values.
Examples ["1.2.3.4","1.2.3.5"]
Set on{rpc.method} CLIENT: rpc.connect_rpc.call.client (opt-in), rpc.grpc.call.client (opt-in), rpc.dubbo.call.client (opt-in){rpc.method} SERVER: rpc.connect_rpc.call.server (opt-in), rpc.grpc.call.server (opt-in), rpc.dubbo.call.server (opt-in)
Official definition
string[]Development
RPC response metadata, <key> being the normalized RPC metadata key (lowercase), the value being the metadata values.
Examples ["attribute_value"]
Set on{rpc.method} CLIENT: rpc.connect_rpc.call.client (opt-in), rpc.grpc.call.client (opt-in), rpc.dubbo.call.client (opt-in){rpc.method} SERVER: rpc.connect_rpc.call.server (opt-in), rpc.grpc.call.server (opt-in), rpc.dubbo.call.server (opt-in)
Official definition
stringRelease candidate
Status code of the RPC returned by the RPC server or generated by the client
Examples OK, DEADLINE_EXCEEDED, -32602
Set on{rpc.method} CLIENT: rpc.call.client (conditionally required), rpc.connect_rpc.call.client (conditionally required), rpc.grpc.call.client (required), rpc.jsonrpc.call.client (conditionally required), rpc.dubbo.call.client (required){rpc.method} SERVER: rpc.call.server (conditionally required), rpc.connect_rpc.call.server (conditionally required), rpc.grpc.call.server (required), rpc.jsonrpc.call.server (conditionally required), rpc.dubbo.call.server (required){mcp.method.name} CLIENT: mcp.client (conditionally required){mcp.method.name} SERVER: mcp.server (conditionally required)
Official definition
stringRelease candidate
The Remote Procedure Call (RPC) system.
Values grpc, dubbo, connectrpc, jsonrpc
Set on{rpc.method} CLIENT: rpc.call.client (required){rpc.method} SERVER: rpc.call.server (required)
Official definition
Which names were renamed or removed?
Deprecated names you may still see in older traces, each with what replaced it.
stringDeprecated
Renamed to rpc.response.status_code.
Values cancelled, unknown, invalid_argument, deadline_exceeded, not_found, already_exists, permission_denied, resource_exhausted, failed_precondition, aborted, out_of_range, unimplemented, internal, unavailable, data_loss, unauthenticated
Official definition
string[]Deprecated
Renamed to rpc.request.metadata.<key>.
Examples ["1.2.3.4","1.2.3.5"]
Official definition
string[]Deprecated
Renamed to rpc.response.metadata.<key>.
Examples ["attribute_value"]
Official definition
string[]Deprecated
Renamed to rpc.request.metadata.<key>.
Examples ["1.2.3.4","1.2.3.5"]
Official definition
string[]Deprecated
Renamed to rpc.response.metadata.<key>.
Examples ["attribute_value"]
Official definition
stringDeprecated
Replaced by rpc.response.status_code.
Values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
Official definition
intDeprecated
Replaced by rpc.response.status_code.
Examples -32700, 100
Official definition
stringDeprecated
Use the span status description when reporting JSON-RPC spans.
Examples Parse error, User already exists
Official definition
stringDeprecated
Renamed to jsonrpc.request.id.
Examples 10, request-7,
Official definition
stringDeprecated
Renamed to jsonrpc.protocol.version.
Examples 2.0, 1.0
Official definition
intDeprecated
Deprecated, no replacement at this time.
Official definition
intDeprecated
Deprecated, no replacement at this time.
Official definition
stringDeprecated
Deprecated, no replacement at this time.
Values SENT, RECEIVED
Official definition
intDeprecated
Deprecated, no replacement at this time.
Official definition
stringDeprecated
Value should be included in rpc.method which is expected to be a fully-qualified name.
Examples myservice.EchoService
Official definition
stringDeprecated
Renamed to rpc.system.name.
Values grpc, java_rmi, dotnet_wcf, apache_dubbo, connect_rpc, onc_rpc, jsonrpc
Official definition
Attribute names, types, stability and descriptions are from the OpenTelemetry semantic conventions (open-telemetry/semantic-conventions), © OpenTelemetry Authors, Apache-2.0. Each attribute links to its official definition, which wins where the two differ.