Skip to content

Commit

Permalink
add rabbitmq to semantic conventions yaml (#1651)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
blumamir and bogdandrutu authored Apr 27, 2021
1 parent 3ef243f commit 5a19b53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion specification/trace/semantic_conventions/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- semconv messaging.rabbitmq -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `messaging.rabbitmq.routing_key` | string | RabbitMQ message routing key. | `myKey` | Unless it is empty. |
<!-- endsemconv -->

#### Apache Kafka

Expand Down

0 comments on commit 5a19b53

Please sign in to comment.