Skip to content

Commit 9c276c3

Browse files
authored
Add more semantic convention attributes for Apache RocketMQ (#2881)
1 parent 7405243 commit 9c276c3

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ release.
3131
([#2874](https://github.com/open-telemetry/opentelemetry-specification/pull/2874))
3232
- Add `process.paging.faults` metric to semantic conventions
3333
([#2827](https://github.com/open-telemetry/opentelemetry-specification/pull/2827))
34+
- Add more semantic convetion attributes of Apache RocketMQ
35+
([#2881](https://github.com/open-telemetry/opentelemetry-specification/pull/2881))
3436

3537
### Compatibility
3638

semantic_conventions/trace/messaging.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,27 @@ groups:
220220
brief: >
221221
The unique identifier for each client.
222222
examples: 'myhost@8742@s8083jm'
223+
- id: delivery_timestamp
224+
type: int
225+
requirement_level:
226+
conditionally_required: If the message type is delay and delay time level is not specified.
227+
brief: >
228+
The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
229+
examples: 1665987217045
230+
- id: delay_time_level
231+
type: int
232+
requirement_level:
233+
conditionally_required: If the message type is delay and delivery timestamp is not specified.
234+
brief: >
235+
The delay time level for delay message, which determines the message delay time.
236+
examples: 3
237+
- id: message_group
238+
type: string
239+
requirement_level:
240+
conditionally_required: If the message type is FIFO.
241+
brief: >
242+
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.
243+
examples: 'myMessageGroup'
223244
- id: message_type
224245
type:
225246
allow_custom_values: false

specification/trace/semantic_conventions/messaging.md

+7
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,18 @@ Specific attributes for Apache RocketMQ are defined below.
301301
| `messaging.rocketmq.namespace` | string | Namespace of RocketMQ resources, resources in different namespaces are individual. | `myNamespace` | Required |
302302
| `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 |
303303
| `messaging.rocketmq.client_id` | string | The unique identifier for each client. | `myhost@8742@s8083jm` | Required |
304+
| `messaging.rocketmq.delivery_timestamp` | int | The timestamp in milliseconds that the delay message is expected to be delivered to consumer. | `1665987217045` | Conditionally Required: [1] |
305+
| `messaging.rocketmq.delay_time_level` | int | The delay time level for delay message, which determines the message delay time. | `3` | Conditionally Required: [2] |
306+
| `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. |
304307
| `messaging.rocketmq.message_type` | string | Type of message. | `normal` | Recommended |
305308
| `messaging.rocketmq.message_tag` | string | The secondary classifier of message besides topic. | `tagA` | Recommended |
306309
| `messaging.rocketmq.message_keys` | string[] | Key(s) of message, another way to mark message besides message id. | `[keyA, keyB]` | Recommended |
307310
| `messaging.rocketmq.consumption_model` | string | Model of message consumption. This only applies to consumer spans. | `clustering` | Recommended |
308311

312+
**[1]:** If the message type is delay and delay time level is not specified.
313+
314+
**[2]:** If the message type is delay and delivery timestamp is not specified.
315+
309316
`messaging.rocketmq.message_type` MUST be one of the following:
310317

311318
| Value | Description |

0 commit comments

Comments
 (0)