diff --git a/CHANGELOG.md b/CHANGELOG.md index c03efda5b83..a0fb6d1555d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ release. ([#2874](https://github.com/open-telemetry/opentelemetry-specification/pull/2874)) - Add `process.paging.faults` metric to semantic conventions ([#2827](https://github.com/open-telemetry/opentelemetry-specification/pull/2827)) +- Add more semantic convetion attributes of Apache RocketMQ + ([#2881](https://github.com/open-telemetry/opentelemetry-specification/pull/2881)) ### Compatibility diff --git a/semantic_conventions/trace/messaging.yaml b/semantic_conventions/trace/messaging.yaml index 1578ee0a20b..f50844a8a95 100644 --- a/semantic_conventions/trace/messaging.yaml +++ b/semantic_conventions/trace/messaging.yaml @@ -220,6 +220,27 @@ groups: brief: > The unique identifier for each client. examples: 'myhost@8742@s8083jm' + - id: delivery_timestamp + type: int + requirement_level: + conditionally_required: If the message type is delay and delay time level is not specified. + brief: > + The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + examples: 1665987217045 + - id: delay_time_level + type: int + requirement_level: + conditionally_required: If the message type is delay and delivery timestamp is not specified. + brief: > + The delay time level for delay message, which determines the message delay time. + examples: 3 + - id: message_group + type: string + requirement_level: + conditionally_required: If the message type is FIFO. + brief: > + It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. + examples: 'myMessageGroup' - id: message_type type: allow_custom_values: false diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 0c7d8eec90f..c11b4fd5c6e 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -301,11 +301,18 @@ Specific attributes for Apache RocketMQ are defined below. | `messaging.rocketmq.namespace` | string | Namespace of RocketMQ resources, resources in different namespaces are individual. | `myNamespace` | Required | | `messaging.rocketmq.client_group` | string | Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind. | `myConsumerGroup` | Required | | `messaging.rocketmq.client_id` | string | The unique identifier for each client. | `myhost@8742@s8083jm` | Required | +| `messaging.rocketmq.delivery_timestamp` | int | The timestamp in milliseconds that the delay message is expected to be delivered to consumer. | `1665987217045` | Conditionally Required: [1] | +| `messaging.rocketmq.delay_time_level` | int | The delay time level for delay message, which determines the message delay time. | `3` | Conditionally Required: [2] | +| `messaging.rocketmq.message_group` | string | It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. | `myMessageGroup` | Conditionally Required: If the message type is FIFO. | | `messaging.rocketmq.message_type` | string | Type of message. | `normal` | Recommended | | `messaging.rocketmq.message_tag` | string | The secondary classifier of message besides topic. | `tagA` | Recommended | | `messaging.rocketmq.message_keys` | string[] | Key(s) of message, another way to mark message besides message id. | `[keyA, keyB]` | Recommended | | `messaging.rocketmq.consumption_model` | string | Model of message consumption. This only applies to consumer spans. | `clustering` | Recommended | +**[1]:** If the message type is delay and delay time level is not specified. + +**[2]:** If the message type is delay and delivery timestamp is not specified. + `messaging.rocketmq.message_type` MUST be one of the following: | Value | Description |