/** * RPC Semantic Convention attributes for OpenTelemetry * * Based on: * - https://opentelemetry.io/docs/specs/semconv/rpc/connect-rpc/ * - https://opentelemetry.io/docs/specs/semconv/rpc/rpc-metrics/ * - https://opentelemetry.io/docs/specs/semconv/attributes-registry/rpc/ * * @module attributes */ declare const RPC_SYSTEM_CONNECT_RPC = "connect_rpc"; declare const ATTR_RPC_SYSTEM = "rpc.system"; declare const ATTR_RPC_SERVICE = "rpc.service"; declare const ATTR_RPC_METHOD = "rpc.method"; declare const ATTR_RPC_CONNECT_RPC_STATUS_CODE = "rpc.connect_rpc.status_code"; declare const ATTR_ERROR_TYPE = "error.type"; declare const ATTR_SERVER_ADDRESS = "server.address"; declare const ATTR_SERVER_PORT = "server.port"; declare const ATTR_NETWORK_PROTOCOL_NAME = "network.protocol.name"; declare const ATTR_NETWORK_TRANSPORT = "network.transport"; declare const ATTR_NETWORK_PEER_ADDRESS = "network.peer.address"; declare const ATTR_NETWORK_PEER_PORT = "network.peer.port"; /** * Connectum-specific span attribute that distinguishes RPC observations * carried by the in-process router transport from those carried by HTTP/2. * * Values: * - `"in-process"` — the call traversed `createLocalTransport` * - `"http"` — the call traversed `createGrpcTransport` / * `createConnectTransport` (the network path) * * Parity tests strip this attribute before structural diffing so that the * remaining shape (spans, events, metric instruments) is invariant across * transports. * * @see ATTR_CONNECTUM_TRANSPORT_METRIC for the metric-label counterpart */ declare const ATTR_CONNECTUM_TRANSPORT = "connectum.transport"; /** * Metric-label counterpart of {@link ATTR_CONNECTUM_TRANSPORT}. * * Uses the short, lowercase form to align with OpenTelemetry metric * label conventions and existing `network.*` keys. */ declare const ATTR_CONNECTUM_TRANSPORT_METRIC = "transport"; /** Marker request header set by `createLocalTransport` from `@connectum/core`. */ declare const CONNECTUM_INTERNAL_TRANSPORT_HEADER = "connectum-internal-transport"; /** Header value indicating an in-process call (the only one currently defined). */ declare const CONNECTUM_INTERNAL_TRANSPORT_IN_PROCESS = "in-process"; declare const RPC_MESSAGE_EVENT = "rpc.message"; declare const ATTR_RPC_MESSAGE_TYPE = "rpc.message.type"; declare const ATTR_RPC_MESSAGE_ID = "rpc.message.id"; declare const ATTR_RPC_MESSAGE_UNCOMPRESSED_SIZE = "rpc.message.uncompressed_size"; /** * ConnectRPC error code map (numeric code -> string name) * Based on Connect protocol error codes */ declare const ConnectErrorCode: { readonly CANCELED: 1; readonly UNKNOWN: 2; readonly INVALID_ARGUMENT: 3; readonly DEADLINE_EXCEEDED: 4; readonly NOT_FOUND: 5; readonly ALREADY_EXISTS: 6; readonly PERMISSION_DENIED: 7; readonly RESOURCE_EXHAUSTED: 8; readonly FAILED_PRECONDITION: 9; readonly ABORTED: 10; readonly OUT_OF_RANGE: 11; readonly UNIMPLEMENTED: 12; readonly INTERNAL: 13; readonly UNAVAILABLE: 14; readonly DATA_LOSS: 15; readonly UNAUTHENTICATED: 16; }; type ConnectErrorCode = (typeof ConnectErrorCode)[keyof typeof ConnectErrorCode]; /** * Reverse map: numeric code -> string name for span attributes */ declare const ConnectErrorCodeName: Record; export { ATTR_CONNECTUM_TRANSPORT, ATTR_CONNECTUM_TRANSPORT_METRIC, ATTR_ERROR_TYPE, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_TRANSPORT, ATTR_RPC_CONNECT_RPC_STATUS_CODE, ATTR_RPC_MESSAGE_ID, ATTR_RPC_MESSAGE_TYPE, ATTR_RPC_MESSAGE_UNCOMPRESSED_SIZE, ATTR_RPC_METHOD, ATTR_RPC_SERVICE, ATTR_RPC_SYSTEM, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, CONNECTUM_INTERNAL_TRANSPORT_HEADER, CONNECTUM_INTERNAL_TRANSPORT_IN_PROCESS, ConnectErrorCode, ConnectErrorCodeName, RPC_MESSAGE_EVENT, RPC_SYSTEM_CONNECT_RPC };