130 lines
4.3 KiB
YAML
130 lines
4.3 KiB
YAML
groups:
|
|
- id: rpc
|
|
prefix: rpc
|
|
type: span
|
|
brief: 'This document defines semantic conventions for remote procedure calls.'
|
|
events: [rpc.message]
|
|
attributes:
|
|
- ref: rpc.system
|
|
requirement_level: required
|
|
- ref: rpc.service
|
|
- ref: rpc.method
|
|
- ref: network.transport
|
|
- ref: network.type
|
|
- ref: server.address
|
|
requirement_level: required
|
|
brief: >
|
|
RPC server [host name](https://grpc.github.io/grpc/core/md_doc_naming.html).
|
|
note: >
|
|
May contain server IP address, DNS name, or local socket name. When host component is an IP address,
|
|
instrumentations SHOULD NOT do a reverse proxy lookup to obtain DNS name and SHOULD set
|
|
`server.address` to the IP address provided in the host component.
|
|
- ref: server.port
|
|
requirement_level:
|
|
conditionally_required: if the port is supported by the network transport used for communication.
|
|
|
|
- id: rpc.client
|
|
type: span
|
|
brief: 'This document defines semantic conventions for remote procedure call client spans.'
|
|
extends: rpc
|
|
attributes:
|
|
- ref: network.peer.address
|
|
- ref: network.peer.port
|
|
requirement_level:
|
|
recommended: If `network.peer.address` is set.
|
|
|
|
- id: rpc.server
|
|
type: span
|
|
extends: rpc
|
|
span_kind: server
|
|
brief: 'Semantic Convention for RPC server spans'
|
|
attributes:
|
|
- ref: client.address
|
|
- ref: client.port
|
|
- ref: network.peer.address
|
|
- ref: network.peer.port
|
|
requirement_level:
|
|
recommended: If `network.peer.address` is set.
|
|
- ref: network.transport
|
|
- ref: network.type
|
|
|
|
- id: rpc.grpc
|
|
type: span
|
|
extends: rpc
|
|
brief: 'Tech-specific attributes for gRPC.'
|
|
attributes:
|
|
- ref: rpc.grpc.status_code
|
|
tag: grpc-tech-specific
|
|
requirement_level: required
|
|
- ref: rpc.grpc.request.metadata
|
|
tag: grpc-tech-specific
|
|
requirement_level: opt_in
|
|
- ref: rpc.grpc.response.metadata
|
|
tag: grpc-tech-specific
|
|
requirement_level: opt_in
|
|
|
|
- id: rpc.jsonrpc
|
|
prefix: rpc.jsonrpc
|
|
type: span
|
|
extends: rpc
|
|
brief: 'Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).'
|
|
attributes:
|
|
- ref: rpc.jsonrpc.version
|
|
tag: jsonrpc-tech-specific
|
|
requirement_level:
|
|
conditionally_required: If other than the default version (`1.0`)
|
|
- ref: rpc.jsonrpc.request_id
|
|
tag: jsonrpc-tech-specific
|
|
- ref: rpc.jsonrpc.error_code
|
|
tag: jsonrpc-tech-specific
|
|
requirement_level:
|
|
conditionally_required: If response is not successful.
|
|
- ref: rpc.jsonrpc.error_message
|
|
tag: jsonrpc-tech-specific
|
|
- ref: rpc.method
|
|
tag: jsonrpc-tech-specific
|
|
requirement_level: required
|
|
note: >
|
|
This is always required for jsonrpc. See the note in the general
|
|
RPC conventions for more information.
|
|
|
|
- id: rpc.message
|
|
prefix: "message" # TODO: Change the prefix to rpc.message?
|
|
type: event
|
|
brief: "RPC received/sent message."
|
|
attributes:
|
|
- id: type
|
|
type:
|
|
members:
|
|
- id: sent
|
|
value: "SENT"
|
|
- id: received
|
|
value: "RECEIVED"
|
|
brief: "Whether this is a received or sent message."
|
|
- id: id
|
|
type: int
|
|
brief: "MUST be calculated as two different counters starting from `1` one for sent messages and one for received message."
|
|
note: "This way we guarantee that the values will be consistent between different implementations."
|
|
- id: compressed_size
|
|
type: int
|
|
brief: "Compressed size of the message in bytes."
|
|
- id: uncompressed_size
|
|
type: int
|
|
brief: "Uncompressed size of the message in bytes."
|
|
|
|
- id: rpc.connect_rpc
|
|
type: span
|
|
extends: rpc
|
|
brief: 'Tech-specific attributes for Connect RPC.'
|
|
attributes:
|
|
- ref: rpc.connect_rpc.error_code
|
|
tag: connect_rpc-tech-specific
|
|
requirement_level:
|
|
conditionally_required: If response is not successful and if error code available.
|
|
- ref: rpc.connect_rpc.request.metadata
|
|
tag: connect_rpc-tech-specific
|
|
requirement_level: opt_in
|
|
- ref: rpc.connect_rpc.response.metadata
|
|
tag: connect_rpc-tech-specific
|
|
requirement_level: opt_in
|