From 8a8209dec8b5eae7cf8be7c12f04c91da5241ccd Mon Sep 17 00:00:00 2001 From: Ken Finnigan Date: Fri, 9 Jul 2021 13:54:39 -0400 Subject: [PATCH] Add `consumer_id` to identify the consumer Resolves #1796 --- semantic_conventions/trace/messaging.yaml | 8 ++++++++ specification/trace/semantic_conventions/messaging.md | 1 + 2 files changed, 9 insertions(+) diff --git a/semantic_conventions/trace/messaging.yaml b/semantic_conventions/trace/messaging.yaml index c4793f05be3..845073ffe78 100644 --- a/semantic_conventions/trace/messaging.yaml +++ b/semantic_conventions/trace/messaging.yaml @@ -57,6 +57,14 @@ 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: > diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 0bfd5d07af5..f0bf39a830f 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -136,6 +136,7 @@ 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. |