From 2127fbd7dacbabbda28d23c1078f235f96c34da7 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Tue, 14 Nov 2023 12:45:16 +0100 Subject: [PATCH] Changed `messaging.system` attribute type to an open enum Signed-off-by: Alexander Wert --- docs/attributes-registry/messaging.md | 14 ++++++++++++- docs/messaging/messaging-spans.md | 14 ++++++++++++- model/registry/messaging.yaml | 29 ++++++++++++++++++++++++--- 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/docs/attributes-registry/messaging.md b/docs/attributes-registry/messaging.md index 27bbae84c4..5d1aa365a7 100644 --- a/docs/attributes-registry/messaging.md +++ b/docs/attributes-registry/messaging.md @@ -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. @@ -82,4 +82,16 @@ 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) | +| `gcp_pubsub` | Google Cloud Pub/Sub | +| `jms` | Java Message Service | +| `kafka` | Kafka | +| `rabbitmq` | RabbitMQ | +| `rocketmq` | RocketMQ | diff --git a/docs/messaging/messaging-spans.md b/docs/messaging/messaging-spans.md index fa95e8c3b2..41fe469981 100644 --- a/docs/messaging/messaging-spans.md +++ b/docs/messaging/messaging-spans.md @@ -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 | @@ -352,6 +352,18 @@ 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) | +| `gcp_pubsub` | Google Cloud Pub/Sub | +| `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 | diff --git a/model/registry/messaging.yaml b/model/registry/messaging.yaml index f7dd6257ab..ff56992aff 100644 --- a/model/registry/messaging.yaml +++ b/model/registry/messaging.yaml @@ -203,6 +203,29 @@ 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: gcp_pubsub + value: 'gcp_pubsub' + brief: 'Google Cloud Pub/Sub' + - 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'