View Source OpenTelemetry.SemConv.Incubating.RPCAttributes (OpenTelemetry.SemConv v1.27.0)

OpenTelemetry Semantic Conventions for RPC attributes.

Summary

Types

Deprecated, use rpc.message.type instead.

The error codes of the Connect request. Error codes are always string values.

Whether this is a received or sent message.

A string identifying the remoting system. See below for a list of well-known identifiers.

Functions

message_id() deprecated
message_type() deprecated

The error codes of the Connect request. Error codes are always string values.

Connect request metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values.

Connect response metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values.

gRPC request metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values.

gRPC response metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values.

The numeric status code of the gRPC request.

error.code property of response if it is an error response.

error.message property of response if it is an error response.

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 of null value. Omit entirely if this is a notification.

Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.

Compressed size of the message in bytes.

MUST be calculated as two different counters starting from 1 one for sent messages and one for received message.

Whether this is a received or sent message.

Uncompressed size of the message in bytes.

The name of the (logical) method being called, must be equal to the $method part in the span name.

The full (logical) name of the service being called, including its package name, if applicable.

A string identifying the remoting system. See below for a list of well-known identifiers.

Types

@type message_type_values() :: %{sent: :SENT, received: :RECEIVED}

Deprecated, use rpc.message.type instead.

Enum Values

  • :sent e
  • :received e
Link to this type

rpc_connect_rpc_error_code_values()

View Source
@type rpc_connect_rpc_error_code_values() :: %{
  cancelled: :cancelled,
  unknown: :unknown,
  invalid_argument: :invalid_argument,
  deadline_exceeded: :deadline_exceeded,
  not_found: :not_found,
  already_exists: :already_exists,
  permission_denied: :permission_denied,
  resource_exhausted: :resource_exhausted,
  failed_precondition: :failed_precondition,
  aborted: :aborted,
  out_of_range: :out_of_range,
  unimplemented: :unimplemented,
  internal: :internal,
  unavailable: :unavailable,
  data_loss: :data_loss,
  unauthenticated: :unauthenticated
}

The error codes of the Connect request. Error codes are always string values.

Enum Values

  • :cancelled e
  • :unknown e
  • :invalid_argument e
  • :deadline_exceeded e
  • :not_found e
  • :already_exists e
  • :permission_denied e
  • :resource_exhausted e
  • :failed_precondition e
  • :aborted e
  • :out_of_range e
  • :unimplemented e
  • :internal e
  • :unavailable e
  • :data_loss e
  • :unauthenticated e
Link to this type

rpc_grpc_status_code_values()

View Source
@type rpc_grpc_status_code_values() :: %{
  ok: 0,
  cancelled: 1,
  unknown: 2,
  invalid_argument: 3,
  deadline_exceeded: 4,
  not_found: 5,
  already_exists: 6,
  permission_denied: 7,
  resource_exhausted: 8,
  failed_precondition: 9,
  aborted: 10,
  out_of_range: 11,
  unimplemented: 12,
  internal: 13,
  unavailable: 14,
  data_loss: 15,
  unauthenticated: 16
}

The numeric status code of the gRPC request.

Enum Values

  • :ok e - OK
  • :cancelled e - CANCELLED
  • :unknown e - UNKNOWN
  • :invalid_argument e - INVALID_ARGUMENT
  • :deadline_exceeded e - DEADLINE_EXCEEDED
  • :not_found e - NOT_FOUND
  • :already_exists e - ALREADY_EXISTS
  • :permission_denied e - PERMISSION_DENIED
  • :resource_exhausted e - RESOURCE_EXHAUSTED
  • :failed_precondition e - FAILED_PRECONDITION
  • :aborted e - ABORTED
  • :out_of_range e - OUT_OF_RANGE
  • :unimplemented e - UNIMPLEMENTED
  • :internal e - INTERNAL
  • :unavailable e - UNAVAILABLE
  • :data_loss e - DATA_LOSS
  • :unauthenticated e - UNAUTHENTICATED
Link to this type

rpc_message_type_values()

View Source
@type rpc_message_type_values() :: %{sent: :SENT, received: :RECEIVED}

Whether this is a received or sent message.

Enum Values

  • :sent e
  • :received e
@type rpc_system_values() :: %{
  grpc: :grpc,
  java_rmi: :java_rmi,
  dotnet_wcf: :dotnet_wcf,
  apache_dubbo: :apache_dubbo,
  connect_rpc: :connect_rpc
}

A string identifying the remoting system. See below for a list of well-known identifiers.

Enum Values

  • :grpc e - gRPC
  • :java_rmi e - Java RMI
  • :dotnet_wcf e - .NET WCF
  • :apache_dubbo e - Apache Dubbo
  • :connect_rpc e - Connect RPC

Functions

Link to this function

message_compressed_size()

View Source
This function is deprecated. Replaced by `rpc.message.compressed_size`. .
@spec message_compressed_size() :: :"message.compressed_size"
This function is deprecated. Replaced by `rpc.message.id`. .
@spec message_id() :: :"message.id"
This function is deprecated. Replaced by `rpc.message.type`. .
@spec message_type() :: :"message.type"
@spec message_type_values() :: message_type_values()
Link to this function

message_uncompressed_size()

View Source
This function is deprecated. Replaced by `rpc.message.uncompressed_size`. .
@spec message_uncompressed_size() :: :"message.uncompressed_size"
Link to this function

rpc_connect_rpc_error_code()

View Source
@spec rpc_connect_rpc_error_code() :: :"rpc.connect_rpc.error_code"

The error codes of the Connect request. Error codes are always string values.

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code()
:"rpc.connect_rpc.error_code"

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled
:cancelled

iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled}
%{:"rpc.connect_rpc.error_code" => :cancelled}
Link to this function

rpc_connect_rpc_error_code_values()

View Source
@spec rpc_connect_rpc_error_code_values() :: rpc_connect_rpc_error_code_values()
Link to this function

rpc_connect_rpc_request_metadata()

View Source
@spec rpc_connect_rpc_request_metadata() :: :"rpc.connect_rpc.request.metadata"

Connect request metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values.

Value type

Value must be of type [atom() | String.t()].

Notes

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.

Examples

["rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_request_metadata()
:"rpc.connect_rpc.request.metadata"
Link to this function

rpc_connect_rpc_response_metadata()

View Source
@spec rpc_connect_rpc_response_metadata() :: :"rpc.connect_rpc.response.metadata"

Connect response metadata, <key> being the normalized Connect Metadata key (lowercase), the value being the metadata values.

Value type

Value must be of type [atom() | String.t()].

Notes

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.

Examples

["rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_response_metadata()
:"rpc.connect_rpc.response.metadata"
Link to this function

rpc_grpc_request_metadata()

View Source
@spec rpc_grpc_request_metadata() :: :"rpc.grpc.request.metadata"

gRPC request metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values.

Value type

Value must be of type [atom() | String.t()].

Notes

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.

Examples

["rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_request_metadata()
:"rpc.grpc.request.metadata"
Link to this function

rpc_grpc_response_metadata()

View Source
@spec rpc_grpc_response_metadata() :: :"rpc.grpc.response.metadata"

gRPC response metadata, <key> being the normalized gRPC Metadata key (lowercase), the value being the metadata values.

Value type

Value must be of type [atom() | String.t()].

Notes

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.

Examples

["rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_response_metadata()
:"rpc.grpc.response.metadata"
@spec rpc_grpc_status_code() :: :"rpc.grpc.status_code"

The numeric status code of the gRPC request.

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code()
:"rpc.grpc.status_code"

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok
0

iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok}
%{:"rpc.grpc.status_code" => 0}
Link to this function

rpc_grpc_status_code_values()

View Source
@spec rpc_grpc_status_code_values() :: rpc_grpc_status_code_values()
Link to this function

rpc_jsonrpc_error_code()

View Source
@spec rpc_jsonrpc_error_code() :: :"rpc.jsonrpc.error_code"

error.code property of response if it is an error response.

Value type

Value must be of type integer().

Examples

[-32700, 100]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_code()
:"rpc.jsonrpc.error_code"
Link to this function

rpc_jsonrpc_error_message()

View Source
@spec rpc_jsonrpc_error_message() :: :"rpc.jsonrpc.error_message"

error.message property of response if it is an error response.

Value type

Value must be of type atom() | String.t().

Examples

["Parse error", "User already exists"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_message()
:"rpc.jsonrpc.error_message"
Link to this function

rpc_jsonrpc_request_id()

View Source
@spec rpc_jsonrpc_request_id() :: :"rpc.jsonrpc.request_id"

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 of null value. Omit entirely if this is a notification.

Value type

Value must be of type atom() | String.t().

Examples

["10", "request-7", ""]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_request_id()
:"rpc.jsonrpc.request_id"
@spec rpc_jsonrpc_version() :: :"rpc.jsonrpc.version"

Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.

Value type

Value must be of type atom() | String.t().

Examples

["2.0", "1.0"]
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_version()
:"rpc.jsonrpc.version"
Link to this function

rpc_message_compressed_size()

View Source
@spec rpc_message_compressed_size() :: :"rpc.message.compressed_size"

Compressed size of the message in bytes.

Value type

Value must be of type integer().

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_compressed_size()
:"rpc.message.compressed_size"
@spec rpc_message_id() :: :"rpc.message.id"

MUST be calculated as two different counters starting from 1 one for sent messages and one for received message.

Value type

Value must be of type integer().

Notes

This way we guarantee that the values will be consistent between different implementations.

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_id()
:"rpc.message.id"
@spec rpc_message_type() :: :"rpc.message.type"

Whether this is a received or sent message.

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type()
:"rpc.message.type"

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent
:SENT

iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent}
%{:"rpc.message.type" => :SENT}
Link to this function

rpc_message_type_values()

View Source
@spec rpc_message_type_values() :: rpc_message_type_values()
Link to this function

rpc_message_uncompressed_size()

View Source
@spec rpc_message_uncompressed_size() :: :"rpc.message.uncompressed_size"

Uncompressed size of the message in bytes.

Value type

Value must be of type integer().

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_uncompressed_size()
:"rpc.message.uncompressed_size"
@spec rpc_method() :: :"rpc.method"

The name of the (logical) method being called, must be equal to the $method part in the span name.

Value type

Value must be of type atom() | String.t().

Notes

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

Examples

exampleMethod
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_method()
:"rpc.method"
@spec rpc_service() :: :"rpc.service"

The full (logical) name of the service being called, including its package name, if applicable.

Value type

Value must be of type atom() | String.t().

Notes

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

Examples

myservice.EchoService
iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_service()
:"rpc.service"
@spec rpc_system() :: :"rpc.system"

A string identifying the remoting system. See below for a list of well-known identifiers.

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system()
:"rpc.system"

iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc
:grpc

iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc}
%{:"rpc.system" => :grpc}
@spec rpc_system_values() :: rpc_system_values()