Skip to content

Commit

Permalink
Further updates from PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kenfinnigan committed Sep 29, 2020
1 parent 5d8abd3 commit f11c391
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions specification/trace/semantic_conventions/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This envelope may offer the possibility to convey additional metadata, often und
Messages can be delivered to 0, 1, or multiple consumers depending on the dispatching semantic of the protocol.
Traditional messaging brokers, such as JMS, use the concept of topics when a message is dispatched to potentially multiple consumers and queues when a message is dispatched to a single consumer.
In a messaging system such as Apache Kafka, consumer groups are used. Each record, or message, is sent to a single consumer per consumer group.
Whether a specific message is processed as if it were sent to a topic or queue entirely depends on the consumer groups and their composition.
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.

### Destinations

Expand Down Expand Up @@ -74,8 +74,8 @@ The span name SHOULD be set to the message destination name and the operation be
```

The destination name SHOULD only be used for the span name if it is known to be of low cardinality (cf. [general span name guidelines](../api.md#span)).
This should not be statically derived from application code, as applications can use logical names internally that don't match the real destination name.
Destination name can be statically derived from configuration in this case, as it should contain the mapping from logical internal names to the real destination name.
This can be assumed if it is statically derived from application code or configuration.
Wherever possible, the preference is to use real destination names over logical or aliased names.
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.
In these cases, an artificial destination name that best expresses the destination, or a generic, static fallback like `"(temporary)"` for [temporary destinations](#temporary-destinations) SHOULD be used instead.

Expand Down Expand Up @@ -106,7 +106,7 @@ The following operations related to messages are defined for these semantic conv
| -------------- | ----------- |
| `send` | A message is sent to a destination by a message producer/client. |
| `receive` | A message is received from a destination by a message consumer/server. |
| `process` | A message that was previously received from a destination is received for processing by a message consumer/server. It spans receipt of the message to completion of processing, whether successful or not.|
| `process` | A message that was previously received from a destination is processed by a message consumer/server. It spans receipt of the message to completion of processing, whether successful or not.|

## Messaging attributes

Expand All @@ -119,7 +119,7 @@ The following operations related to messages are defined for these semantic conv
| `messaging.protocol` | The name of the transport protocol such as `AMQP` or `MQTT`. | No |
| `messaging.protocol_version` | The version of the transport protocol such as `0.9.1`. | No |
| `messaging.url` | Connection string such as `tibjmsnaming://localhost:7222` or `https://queue.amazonaws.com/80398EXAMPLE/MyQueue`. Only applicable to traditional messaging systems. | No |
| `messaging.service` | Name of the external broker, or name of the service being interacted with. | No |
| `messaging.service` | Name of the external broker, or name of the service being interacted with. See note below for a definition. | No |
| `messaging.message_id` | A value used by the messaging system as an identifier for the message, represented as a string. | No |
| `messaging.conversation_id` | The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". | No |
| `messaging.message_payload_size_bytes` | 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. | No |
Expand Down Expand Up @@ -160,7 +160,7 @@ For Apache Kafka, the following additional attributes are defined:

| Attribute name | Notes and examples |
| -------------- | ---------------------------------------------------------------------- |
| `messaging.kafka.message_key` | Differs from `messaging.message_id` in that it's not unique, can be `null`, and doesn't have a pre-defined type. |
| `messaging.kafka.message_key` | Differs from `messaging.message_id` in that it's not unique, and can be `null`. The type is a String representation of the type of the actual value. |
| `messaging.kafka.consumer_group` | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. |
| `messaging.kafka.client_id` | Client Id for the Consumer or Producer that is handling the message. |
| `messaging.kafka.partition` | Partition the message is sent to. |
Expand Down

0 comments on commit f11c391

Please sign in to comment.