Skip to content

Commit

Permalink
Changed messaging.system attribute type to an open enum
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <[email protected]>
  • Loading branch information
AlexanderWert committed Nov 14, 2023
1 parent 4f89cd7 commit 6f0ce44
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
13 changes: 12 additions & 1 deletion docs/attributes-registry/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| `messaging.rocketmq.message.tag` | string | The secondary classifier of message besides topic. | `tagA` |
| `messaging.rocketmq.message.type` | string | Type of message. | `normal` |
| `messaging.rocketmq.namespace` | string | Namespace of RocketMQ resources, resources in different namespaces are individual. | `myNamespace` |
| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq` |
| `messaging.system` | string | An identifier for the messaging system being used. See below for a list of well-known identifiers. | `activemq` |

**[1]:** Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.

Expand Down Expand Up @@ -82,4 +82,15 @@ size should be used.
| `fifo` | FIFO message |
| `delay` | Delay message |
| `transaction` | Transaction message |

`messaging.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
|---|---|
| `activemq` | ActiveMQ |
| `AmazonSQS` | Amazon Simple Queue Service (SQS) |
| `jms` | Java Message Service |
| `kafka` | Kafka |
| `rabbitmq` | RabbitMQ |
| `rocketmq` | RocketMQ |
<!-- endsemconv -->
13 changes: 12 additions & 1 deletion docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ messages were received). For each message it accounts for, the "Deliver" or
| [`messaging.message.envelope.size`](../attributes-registry/messaging.md) | int | The size of the message body and metadata in bytes. [12] | `2738` | Recommended: [13] |
| [`messaging.message.id`](../attributes-registry/messaging.md) | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | Recommended: [14] |
| [`messaging.operation`](../attributes-registry/messaging.md) | string | A string identifying the kind of messaging operation. [15] | `publish` | Required |
| [`messaging.system`](../attributes-registry/messaging.md) | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq` | Required |
| [`messaging.system`](../attributes-registry/messaging.md) | string | An identifier for the messaging system being used. See below for a list of well-known identifiers. | `activemq` | Required |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended |
| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [16] | `amqp`; `mqtt` | Recommended |
Expand Down Expand Up @@ -352,6 +352,17 @@ different processes could be listening on TCP port 12345 and UDP port 12345.
| `receive` | One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. |
| `deliver` | One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs. |

`messaging.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
|---|---|
| `activemq` | ActiveMQ |
| `AmazonSQS` | Amazon Simple Queue Service (SQS) |
| `jms` | Java Message Service |
| `kafka` | Kafka |
| `rabbitmq` | RabbitMQ |
| `rocketmq` | RocketMQ |

`network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
Expand Down
26 changes: 23 additions & 3 deletions model/registry/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,26 @@ groups:
Namespace of RocketMQ resources, resources in different namespaces are individual.
examples: 'myNamespace'
- id: system
type: string
brief: 'A string identifying the messaging system.'
examples: ['kafka', 'rabbitmq', 'rocketmq', 'activemq']
brief: >
An identifier for the messaging system being used. See below for a list of well-known identifiers.
type:
allow_custom_values: true
members:
- id: activemq
value: 'activemq'
brief: 'ActiveMQ'
- id: amazonsqs
value: 'AmazonSQS'
brief: 'Amazon Simple Queue Service (SQS)'
- id: jms
value: 'jms'
brief: 'Java Message Service'
- id: kafka
value: 'kafka'
brief: 'Kafka'
- id: rabbitmq
value: 'rabbitmq'
brief: 'RabbitMQ'
- id: rocketmq
value: 'rocketmq'
brief: 'RocketMQ'

0 comments on commit 6f0ce44

Please sign in to comment.