Skip to content

Commit

Permalink
Add more semantic convention attributes for Apache RocketMQ
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-ai committed Nov 3, 2022
1 parent 08a15ef commit 704c641
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ release.
([#2874](https:/open-telemetry/opentelemetry-specification/pull/2874))
- Add `process.paging.faults` metric to semantic conventions
([#2827](https:/open-telemetry/opentelemetry-specification/pull/2827))
- Add more semantic convetion attributes of Apache RocketMQ
([#2881](https:/open-telemetry/opentelemetry-specification/pull/2881))

### Compatibility

Expand Down
21 changes: 21 additions & 0 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions specification/trace/semantic_conventions/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit 704c641

Please sign in to comment.