Module: OpenTelemetry::SemConv::Incubating::RPC
- Defined in:
- lib/opentelemetry/semconv/incubating/rpc/metrics.rb,
lib/opentelemetry/semconv/incubating/rpc/attributes.rb
Metrics Names collapse
- RPC_CLIENT_DURATION =
Note:
Stability Level: development
Measures the duration of outbound RPC.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it’s hard to interpret in practice.
Streaming: N/A.
'rpc.client.duration'
- RPC_CLIENT_REQUEST_SIZE =
Note:
Stability Level: development
Measures the size of RPC request messages (uncompressed).
Streaming: Recorded per message in a streaming batch
'rpc.client.request.size'
- RPC_CLIENT_REQUESTS_PER_RPC =
Note:
Stability Level: development
Measures the number of messages received per RPC.
Should be 1 for all non-streaming RPCs.
Streaming: This metric is required for server and client streaming RPCs
'rpc.client.requests_per_rpc'
- RPC_CLIENT_RESPONSE_SIZE =
Note:
Stability Level: development
Measures the size of RPC response messages (uncompressed).
Streaming: Recorded per response in a streaming batch
'rpc.client.response.size'
- RPC_CLIENT_RESPONSES_PER_RPC =
Note:
Stability Level: development
Measures the number of messages sent per RPC.
Should be 1 for all non-streaming RPCs.
Streaming: This metric is required for server and client streaming RPCs
'rpc.client.responses_per_rpc'
- RPC_SERVER_DURATION =
Note:
Stability Level: development
Measures the duration of inbound RPC.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it’s hard to interpret in practice.
Streaming: N/A.
'rpc.server.duration'
- RPC_SERVER_REQUEST_SIZE =
Note:
Stability Level: development
Measures the size of RPC request messages (uncompressed).
Streaming: Recorded per message in a streaming batch
'rpc.server.request.size'
- RPC_SERVER_REQUESTS_PER_RPC =
Note:
Stability Level: development
Measures the number of messages received per RPC.
Should be 1 for all non-streaming RPCs.
Streaming : This metric is required for server and client streaming RPCs
'rpc.server.requests_per_rpc'
- RPC_SERVER_RESPONSE_SIZE =
Note:
Stability Level: development
Measures the size of RPC response messages (uncompressed).
Streaming: Recorded per response in a streaming batch
'rpc.server.response.size'
- RPC_SERVER_RESPONSES_PER_RPC =
Note:
Stability Level: development
Measures the number of messages sent per RPC.
Should be 1 for all non-streaming RPCs.
Streaming: This metric is required for server and client streaming RPCs
'rpc.server.responses_per_rpc'
Attribute Names collapse
- RPC_CONNECT_RPC_ERROR_CODE =
Note:
Stability Level: development
The error codes of the Connect request. Error codes are always string values.
'rpc.connect_rpc.error_code'
- RPC_CONNECT_RPC_REQUEST_METADATA_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
Connect request metadata,
<key>
being the normalized Connect Metadata key (lowercase), the value being the metadata values.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 therpc.connect_rpc.request.metadata.my-custom-key
attribute with value["1.2.3.4", "1.2.3.5"]
->(key) { "rpc.connect_rpc.request.metadata.#{key}" }
- RPC_CONNECT_RPC_RESPONSE_METADATA_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
Connect response metadata,
<key>
being the normalized Connect Metadata key (lowercase), the value being the metadata values.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 therpc.connect_rpc.response.metadata.my-custom-key
attribute with value["attribute_value"]
->(key) { "rpc.connect_rpc.response.metadata.#{key}" }
- RPC_GRPC_REQUEST_METADATA_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
gRPC request metadata,
<key>
being the normalized gRPC Metadata key (lowercase), the value being the metadata values.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 asrpc.grpc.request.metadata.my-custom-key
attribute with value["1.2.3.4", "1.2.3.5"]
->(key) { "rpc.grpc.request.metadata.#{key}" }
- RPC_GRPC_RESPONSE_METADATA_LAMBDA =
Note:
Stability Level: development
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
gRPC response metadata,
<key>
being the normalized gRPC Metadata key (lowercase), the value being the metadata values.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 therpc.grpc.response.metadata.my-custom-key
attribute with value["attribute_value"]
->(key) { "rpc.grpc.response.metadata.#{key}" }
- RPC_GRPC_STATUS_CODE =
Note:
Stability Level: development
The numeric status code of the gRPC request.
'rpc.grpc.status_code'
- RPC_JSONRPC_ERROR_CODE =
Note:
Stability Level: development
error.code
property of response if it is an error response. 'rpc.jsonrpc.error_code'
- RPC_JSONRPC_ERROR_MESSAGE =
Note:
Stability Level: development
error.message
property of response if it is an error response. 'rpc.jsonrpc.error_message'
- RPC_JSONRPC_REQUEST_ID =
Note:
Stability Level: development
id
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 ofnull
value. Omit entirely if this is a notification. 'rpc.jsonrpc.request_id'
- RPC_JSONRPC_VERSION =
Note:
Stability Level: development
Protocol version as in
jsonrpc
property of request/response. Since JSON-RPC 1.0 doesn’t specify this, the value can be omitted. 'rpc.jsonrpc.version'
- RPC_MESSAGE_COMPRESSED_SIZE =
Note:
Stability Level: development
Compressed size of the message in bytes.
'rpc.message.compressed_size'
- RPC_MESSAGE_ID =
Note:
Stability Level: development
MUST be calculated as two different counters starting from
1
one for sent messages and one for received message.This way we guarantee that the values will be consistent between different implementations.
'rpc.message.id'
- RPC_MESSAGE_TYPE =
Note:
Stability Level: development
Whether this is a received or sent message.
'rpc.message.type'
- RPC_MESSAGE_UNCOMPRESSED_SIZE =
Note:
Stability Level: development
Uncompressed size of the message in bytes.
'rpc.message.uncompressed_size'
- RPC_METHOD =
Note:
Stability Level: development
The name of the (logical) method being called, must be equal to the $method part in the span name.
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 store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). 'rpc.method'
- RPC_SERVICE =
Note:
Stability Level: development
The full (logical) name of the service being called, including its package name, if applicable.
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.service'
- RPC_SYSTEM =
Note:
Stability Level: development
A string identifying the remoting system. See below for a list of well-known identifiers.
'rpc.system'