Skip to content

Commit

Permalink
Changed messaging.system attribute type to an open enum (open-telem…
Browse files Browse the repository at this point in the history
…etry#517)

Signed-off-by: Alexander Wert <[email protected]>
  • Loading branch information
AlexanderWert authored and pyohannes committed Jan 17, 2024
1 parent ec75aba commit 86d6561
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ release.
([#317](https://github.com/open-telemetry/semantic-conventions/pull/317))
- BREAKING: Change type of `host.cpu.model.id` and `host.cpu.model.family` to string.
([#495](https://github.com/open-telemetry/semantic-conventions/issues/495))
- Changed `messaging.system` attribute type to an open enum
([#517](https://github.com/open-telemetry/semantic-conventions/pull/517))

### Features

Expand Down
17 changes: 16 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,19 @@ 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` | Apache ActiveMQ |
| `aws_sqs` | Amazon Simple Queue Service (SQS) |
| `azure_eventgrid` | Azure Event Grid |
| `azure_eventhubs` | Azure Event Hubs |
| `azure_servicebus` | Azure Service Bus |
| `gcp_pubsub` | Google Cloud Pub/Sub |
| `jms` | Java Message Service |
| `kafka` | Apache Kafka |
| `rabbitmq` | RabbitMQ |
| `rocketmq` | Apache RocketMQ |
<!-- endsemconv -->
17 changes: 16 additions & 1 deletion docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,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 @@ -354,6 +354,21 @@ 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` | Apache ActiveMQ |
| `aws_sqs` | Amazon Simple Queue Service (SQS) |
| `azure_eventgrid` | Azure Event Grid |
| `azure_eventhubs` | Azure Event Hubs |
| `azure_servicebus` | Azure Service Bus |
| `gcp_pubsub` | Google Cloud Pub/Sub |
| `jms` | Java Message Service |
| `kafka` | Apache Kafka |
| `rabbitmq` | RabbitMQ |
| `rocketmq` | Apache 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
38 changes: 35 additions & 3 deletions model/registry/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,38 @@ 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: 'Apache ActiveMQ'
- id: aws_sqs
value: 'aws_sqs'
brief: 'Amazon Simple Queue Service (SQS)'
- id: azure_eventgrid
value: 'azure_eventgrid'
brief: 'Azure Event Grid'
- id: azure_eventhubs
value: 'azure_eventhubs'
brief: 'Azure Event Hubs'
- id: azure_servicebus
value: 'azure_servicebus'
brief: 'Azure Service Bus'
- id: gcp_pubsub
value: 'gcp_pubsub'
brief: 'Google Cloud Pub/Sub'
- id: jms
value: 'jms'
brief: 'Java Message Service'
- id: kafka
value: 'kafka'
brief: 'Apache Kafka'
- id: rabbitmq
value: 'rabbitmq'
brief: 'RabbitMQ'
- id: rocketmq
value: 'rocketmq'
brief: 'Apache RocketMQ'

0 comments on commit 86d6561

Please sign in to comment.