You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/trace/semantic_conventions/messaging.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ The destination name SHOULD only be used for the span name if it is known to be
155
155
This can be assumed if it is statically derived from application code or configuration.
156
156
Wherever possible, the real destination names after resolving logical or aliased names SHOULD be used.
157
157
If the destination name is dynamic, such as a [conversation ID](#conversations) or a value obtained from a `Reply-To` header, it SHOULD NOT be used for the span name.
158
-
In these cases, an artificial destination name that best expresses the destination, or a generic, static fallback like `"(anonymous)"` for [anonymous destinations](#temporary-and-anonymous-destinations) SHOULD be used instead.anonymous
158
+
In these cases, an artificial destination name that best expresses the destination, or a generic, static fallback like `"(anonymous)"` for [anonymous destinations](#temporary-and-anonymous-destinations) SHOULD be used instead.
159
159
160
160
The values allowed for `<operation name>` are defined in the section [Operation names](#operation-names) below.
161
161
If the format above is used, the operation name MUST match the `messaging.operation` attribute defined for message consumer spans below.
@@ -206,7 +206,7 @@ The following operations related to messages are defined for these semantic conv
|[`net.sock.peer.port`](span-general.md)| int | Remote socket peer port. |`16456`| Recommended: [12]|
208
208
209
-
**[1]:** If custom value is used, it MUST known to be of low cardinality.
209
+
**[1]:** If a custom value is used, it MUST known to be of low cardinality.
210
210
211
211
**[2]:** Instrumentations SHOULD NOT set `messaging.batch.size` on spans that operate with a single message. When client library supports batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.size` for batching APIs and SHOULD NOT use it for single-message APIs.
212
212
@@ -253,7 +253,7 @@ logical entity messages are received from. Attributes in `messaging.batch` names
253
253
254
254
### Producer attributes
255
255
256
-
Following additional attributes describe message producer operations.
256
+
The following additional attributes describe message producer operations.
|`messaging.source.temporary`| boolean | A boolean that is true if the message source is temporary and might not exist anymore after messages are processed. || Recommended: [4]|
301
301
|`messaging.source.anonymous`| boolean | A boolean that is true if the message source is anonymous (could be unnamed or have auto-generated name). || Recommended: [5]|
302
-
|`messaging.source.name`| string | The message source name [6]|`MyQueue`; `MyTopic`| Conditionally Required: [7]|
302
+
|`messaging.destination.anonymous`| boolean | A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). || Recommended: If known on consumer |
303
+
|`messaging.destination.kind`| string | The kind of message destination |`queue`| Recommended: If known on consumer |
304
+
|`messaging.destination.name`| string | The message destination name [6]|`MyQueue`; `MyTopic`| Recommended: If known on consumer |
305
+
|`messaging.destination.temporary`| boolean | A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. || Recommended: If known on consumer |
306
+
|`messaging.source.name`| string | The message source name [7]|`MyQueue`; `MyTopic`| Conditionally Required: [8]|
303
307
304
308
**[1]:** If the message source is either a `queue` or `topic`.
**[5]:** when supported by messaging system and only if the source is anonymous. If missing, assumed to be false.
313
317
314
-
**[6]:** Source name SHOULD uniquely identify specific queue, topic, or other entity within broker. If
318
+
**[6]:** Destination name SHOULD uniquely identify specific queue, topic, or other entity within broker. If
319
+
broker does not have such notion, destination name SHOULD uniquely identify broker.
320
+
321
+
**[7]:** Source name SHOULD uniquely identify specific queue, topic, or other entity within broker. If
315
322
broker does not have such notion, source name SHOULD uniquely identify broker.
316
323
317
-
**[7]:** If the value applies to all messages in the batch.
324
+
**[8]:** If the value applies to all messages in the batch.
318
325
319
326
`messaging.source.kind` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
320
327
@@ -358,7 +365,7 @@ In RabbitMQ, the destination is defined by an *exchange* and a *routing key*.
|`messaging.rabbitmq.message.routing_key`| string | RabbitMQ message routing key. |`myKey`| Conditionally Required: If not empty. |
368
+
|`messaging.rabbitmq.destination.routing_key`| string | RabbitMQ message routing key. |`myKey`| Conditionally Required: If not empty. |
362
369
<!-- endsemconv -->
363
370
364
371
#### Apache Kafka
@@ -371,7 +378,8 @@ For Apache Kafka, the following additional attributes are defined:
371
378
|`messaging.kafka.message.key`| string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [1]|`myKey`| Recommended |
372
379
|`messaging.kafka.consumer_group`| string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. |`my-group`| Recommended |
373
380
|`messaging.kafka.client_id`| string | Client Id for the Consumer or Producer that is handling the message. |`client-5`| Recommended |
374
-
|`messaging.kafka.message.partition`| int | Partition the message is sent to. |`2`| Recommended |
381
+
|`messaging.kafka.destination.partition`| int | Partition the message is sent to. |`2`| Recommended |
382
+
|`messaging.kafka.source.partition`| int | Partition the message is received from. |`2`| Recommended |
375
383
|`messaging.kafka.message.tombstone`| boolean | A boolean that is true if the message is a tombstone. || Conditionally Required: [2]|
376
384
377
385
**[1]:** If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
0 commit comments