From 4f1c4a480b937168a96c5db788dcc8dba4ee4d47 Mon Sep 17 00:00:00 2001 From: Johannes Tax Date: Fri, 20 May 2022 14:09:41 -0700 Subject: [PATCH] Add trace semantic conventions attributes for application layer protocols --- semantic_conventions/trace/general.yaml | 8 ++++++++ specification/trace/semantic_conventions/span-general.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/semantic_conventions/trace/general.yaml b/semantic_conventions/trace/general.yaml index b8274e3fdc4..aafa0b130e1 100644 --- a/semantic_conventions/trace/general.yaml +++ b/semantic_conventions/trace/general.yaml @@ -33,6 +33,14 @@ groups: brief: 'Something else (non IP-based).' brief: > Transport protocol used. See note below. + - id: protocol.name + type: string + brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.' + examples: ['amqp', 'http', 'nntp'] + - id: protocol.version + type: string + brief: 'Version of the application layer protocol used.' + examples: '0.9.1' - id: peer.ip type: string brief: > diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 639d468dd53..ddb965d399c 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -35,6 +35,8 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties | Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `net.transport` | string | Transport protocol used. See note below. | `ip_tcp` | No | +| `net.protocol.name` | string | Application layer protocol used. The value SHOULD be normalized to lowercase. | `amqp`; `http`; `nntp` | No | +| `net.protocol.version` | string | Version of the application layer protocol used. | `0.9.1` | No | | `net.peer.ip` | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | No | | `net.peer.port` | int | Remote port number. | `80`; `8080`; `443` | No | | `net.peer.name` | string | Remote hostname or similar, see note below. [1] | `example.com` | No |