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
BREAKING: remove messaging.destination.kind and messaging.source.kind values (#3214)
Fixes#3170, #3265, #3249
## Changes
~~We currently allow `topic` or `queue` on `messaging.destination.kind`.
While it's common in messaging world to have one or another, messaging
semantic conventions can be applied to AMPQ communication (which does
not have topic/queue terminology), [socket.io](https://socket.io/), and
potentially other less traditional messaging use-cases.~~
It's unclear how `messaging.destination.kind` and
`messaging.source.kind` could be used. The distinction between queue and
topic is significant for messaging and distributed systems, but not for
tracing.
In either case, tracing backends should expect to process traces from 0+
messaging and 0+ messaging consumers. In either case, message consumers
can be simultaneous or consequent and there could be many of them.
The only known case (Solace) where it could be useful is when messaging
system allows having queues and topic with the same name on the same
broker, and it could be used to distinguish one from another.
Based on messaging SIG discussion, the attributes are removed for the
time being until we understand if and how they are useful.
Depending on messaging system queues or topics behavior vary a lot and
in future it would makes more sense to represent actual behavior with
individual attributes such as:
- auto-settlement (at-most-once or at least once guarantees)
- settlement for individual messages or offsets
- broadcast or unicast
- etc
Copy file name to clipboardExpand all lines: specification/trace/semantic_conventions/messaging.md
+18-43Lines changed: 18 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,21 +78,11 @@ might be another intermediary or a consumer.
78
78
### Destinations and sources
79
79
80
80
A destination is usually uniquely identified by name within the messaging system instance. Examples of a destination name would be a URL or a simple one-word identifier.
81
-
Traditional messaging, such as JMS, involves two kinds of destinations: *topic*s and *queue*s.
82
-
83
-
A message that is sent (the send-operation is often called "*publish*" in this context) to a *topic* is broadcasted to all consumers that have *subscribed* to the topic.
84
-
85
-
A message that is sent to a *queue* is processed by a message *consumer* (usually exactly once although some message systems support a more performant at-least-once mode for messages with [idempotent][] processing).
81
+
Sending messages to a destination is called "*publish*" in context of this specification.
86
82
87
83
A source represents an entity within messaging system messages are consumed from. Source and destination for specific message may be the same. However, if message is routed within one or multiple brokers, source and destination can be different.
88
84
89
-
In a messaging system such as Apache Kafka, all destinations are *topic*s.
90
-
Each record, or message, is sent to a single consumer per consumer group.
91
-
Consumer groups provide *deliver once* semantics for consumers of a topic within a group.
92
-
Whether a specific message is processed as if it was sent to a topic or queue entirely depends on the consumer groups and their composition.
93
-
For instance, there can be multiple consumer groups processing records from the same topic.
|`messaging.destination.anonymous`| boolean | A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). || Conditionally Required: [1]|
277
-
|`messaging.destination.kind`| string | The kind of message destination |`queue`| Conditionally Required: [2]|
278
-
|`messaging.destination.name`| string | The message destination name [3]|`MyQueue`; `MyTopic`| Conditionally Required: [4]|
279
-
|`messaging.destination.template`| string | Low cardinality representation of the messaging destination name [5]|`/customers/{customerId}`| Conditionally Required: [6]|
280
-
|`messaging.destination.temporary`| boolean | A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. || Conditionally Required: [7]|
267
+
|`messaging.destination.name`| string | The message destination name [2]|`MyQueue`; `MyTopic`| Conditionally Required: [3]|
268
+
|`messaging.destination.template`| string | Low cardinality representation of the messaging destination name [4]|`/customers/{customerId}`| Conditionally Required: [5]|
269
+
|`messaging.destination.temporary`| boolean | A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. || Conditionally Required: [6]|
281
270
282
271
**[1]:** If value is `true`. When missing, the value is assumed to be `false`.
283
272
284
-
**[2]:** If the message destination is either a `queue` or a `topic`.
285
-
286
-
**[3]:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If
273
+
**[2]:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If
287
274
the broker does not have such notion, the destination name SHOULD uniquely identify the broker.
288
275
289
-
**[4]:** If one message is being published or if the value applies to all messages in the batch.
276
+
**[3]:** If one message is being published or if the value applies to all messages in the batch.
290
277
291
-
**[5]:** Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
278
+
**[4]:** Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
292
279
293
-
**[6]:** If available. Instrumentations MUST NOT use `messaging.destination.name` as template unless low-cardinality of destination name is guaranteed.
280
+
**[5]:** If available. Instrumentations MUST NOT use `messaging.destination.name` as template unless low-cardinality of destination name is guaranteed.
294
281
295
-
**[7]:** If value is `true`. When missing, the value is assumed to be `false`.
282
+
**[6]:** If value is `true`. When missing, the value is assumed to be `false`.
296
283
<!-- endsemconv -->
297
284
298
285
### Consumer attributes
@@ -306,32 +293,28 @@ The following additional attributes describe message consumer operations.
306
293
|---|---|---|---|---|
307
294
|`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`| Recommended |
308
295
|`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 |
309
-
|`messaging.destination.kind`| string | The kind of message destination |`queue`| Recommended: If known on consumer |
310
296
|`messaging.destination.name`| string | The message destination name [1]|`MyQueue`; `MyTopic`| Recommended: If known on consumer |
311
297
|`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 |
312
298
|`messaging.source.anonymous`| boolean | A boolean that is true if the message source is anonymous (could be unnamed or have auto-generated name). || Recommended: [2]|
313
-
|`messaging.source.kind`| string | The kind of message source |`queue`| Conditionally Required: [3]|
314
-
|`messaging.source.name`| string | The message source name [4]|`MyQueue`; `MyTopic`| Conditionally Required: [5]|
315
-
|`messaging.source.template`| string | Low cardinality representation of the messaging source name [6]|`/customers/{customerId}`| Conditionally Required: [7]|
316
-
|`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: [8]|
299
+
|`messaging.source.name`| string | The message source name [3]|`MyQueue`; `MyTopic`| Conditionally Required: [4]|
300
+
|`messaging.source.template`| string | Low cardinality representation of the messaging source name [5]|`/customers/{customerId}`| Conditionally Required: [6]|
301
+
|`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: [7]|
317
302
318
303
**[1]:** Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If
319
304
the broker does not have such notion, the destination name SHOULD uniquely identify the broker.
320
305
321
306
**[2]:** When supported by messaging system and only if the source is anonymous. When missing, the value is assumed to be `false`.
322
307
323
-
**[3]:** If the message source is either a `queue` or `topic`.
324
-
325
-
**[4]:** Source name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If
308
+
**[3]:** Source name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If
326
309
the broker does not have such notion, the source name SHOULD uniquely identify the broker.
327
310
328
-
**[5]:** If the value applies to all messages in the batch.
311
+
**[4]:** If the value applies to all messages in the batch.
329
312
330
-
**[6]:** Source names could be constructed from templates. An example would be a source name involving a user name or product id. Although the source name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
313
+
**[5]:** Source names could be constructed from templates. An example would be a source name involving a user name or product id. Although the source name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
331
314
332
-
**[7]:** If available. Instrumentations MUST NOT use `messaging.source.name` as template unless low-cardinality of source name is guaranteed.
315
+
**[6]:** If available. Instrumentations MUST NOT use `messaging.source.name` as template unless low-cardinality of source name is guaranteed.
333
316
334
-
**[8]:** When supported by messaging system and only if the source is temporary. When missing, the value is assumed to be `false`.
317
+
**[7]:** When supported by messaging system and only if the source is temporary. When missing, the value is assumed to be `false`.
335
318
<!-- endsemconv -->
336
319
337
320
The *receive* span is be used to track the time used for receiving the message(s), whereas the *process* span(s) track the time for processing the message(s).
0 commit comments