Skip to content

Commit

Permalink
Move consumer_id into messaging.consumer section
Browse files Browse the repository at this point in the history
  • Loading branch information
kenfinnigan committed Jul 14, 2021
1 parent ca15022 commit 0622868
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ groups:
The [conversation ID](#conversations) identifying the conversation to which the message belongs,
represented as a string. Sometimes called "Correlation ID".
examples: 'MyConversationId'
- id: consumer_id
type: string
brief: >
The identifier for the consumer receiving a message. For Kafka, set it to
`{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only
`messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id`
of the client consuming the message.
examples: 'mygroup - client-6'
- id: message_payload_size_bytes
type: int
brief: >
Expand Down Expand Up @@ -120,6 +112,14 @@ groups:
[Operation names](#operation-names) section above.
If the operation is "send", this attribute MUST NOT be set, since the
operation can be inferred from the span kind in that case.
- id: consumer_id
type: string
brief: >
The identifier for the consumer receiving a message. For Kafka, set it to
`{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only
`messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id`
of the client consuming the message.
examples: 'mygroup - client-6'

- id: messaging.consumer.synchronous
prefix: messaging
Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ The following operations related to messages are defined for these semantic conv
| `messaging.url` | string | Connection string. | `tibjmsnaming://localhost:7222`; `https://queue.amazonaws.com/80398EXAMPLE/MyQueue` | No |
| `messaging.message_id` | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | No |
| `messaging.conversation_id` | string | The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". | `MyConversationId` | No |
| `messaging.consumer_id` | string | The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. | `mygroup - client-6` | No |
| `messaging.message_payload_size_bytes` | int | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | No |
| `messaging.message_payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. | `2048` | No |
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | If available. |
Expand Down Expand Up @@ -168,6 +167,7 @@ For message consumers, the following additional attributes may be set:
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `messaging.operation` | string | A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. | `receive` | No |
| `messaging.consumer_id` | string | The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. | `mygroup - client-6` | No |

`messaging.operation` MUST be one of the following:

Expand Down

0 comments on commit 0622868

Please sign in to comment.