From 5a19b53d71e967659517c02a69b801381d29bf1e Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Tue, 27 Apr 2021 18:36:28 +0300 Subject: [PATCH] add rabbitmq to semantic conventions yaml (#1651) * add rabbitmq to semantic conventions yaml * add example for rabbitmq routing key * messaging.rabbitmq - use required syntax * messaging.rabbitmq generate markdown table from yaml * update changelog with adding rabbitmq to yaml Co-authored-by: Bogdan Drutu --- CHANGELOG.md | 1 + semantic_conventions/trace/messaging.yaml | 14 ++++++++++++++ .../trace/semantic_conventions/messaging.md | 7 ++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c05d36b057..aa2059a6381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ release. - Fix the inconsistent formatting of semantic convention enums ([#1598](https://github.com/open-telemetry/opentelemetry-specification/pull/1598/)) - Add details for filling resource for AWS Lambda([#1610](https://github.com/open-telemetry/opentelemetry-specification/pull/1610)) +- Add already specified `messaging.rabbitmq.routing_key` span attribute key to the respective YAML file. ### Compatibility diff --git a/semantic_conventions/trace/messaging.yaml b/semantic_conventions/trace/messaging.yaml index ad2f4802751..c4793f05be3 100644 --- a/semantic_conventions/trace/messaging.yaml +++ b/semantic_conventions/trace/messaging.yaml @@ -121,6 +121,20 @@ groups: Semantic convention for servers that consume messages received from messaging systems and always send back replies directed to the producers of these messages. + - id: messaging.rabbitmq + prefix: messaging.rabbitmq + extends: messaging + brief: > + Attributes for RabbitMQ + attributes: + - id: routing_key + type: string + required: + conditional: Unless it is empty. + brief: > + RabbitMQ message routing key. + examples: 'myKey' + - id: messaging.kafka prefix: messaging.kafka extends: messaging diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index ee8760fa33e..0bfd5d07af5 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -189,7 +189,12 @@ Instead span kind should be set to either `CONSUMER` or `SERVER` according to th In RabbitMQ, the destination is defined by an _exchange_ and a _routing key_. `messaging.destination` MUST be set to the name of the exchange. This will be an empty string if the default exchange is used. -The routing key MUST be provided to the attribute `messaging.rabbitmq.routing_key`, unless it is empty. + + +| Attribute | Type | Description | Examples | Required | +|---|---|---|---|---| +| `messaging.rabbitmq.routing_key` | string | RabbitMQ message routing key. | `myKey` | Unless it is empty. | + #### Apache Kafka