Skip to content

Commit f4811cb

Browse files
author
Liudmila Molkova
committed
rename batch.size to batch.message_count
1 parent 0d29df7 commit f4811cb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

semantic_conventions/trace/messaging.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ groups:
6767
A string identifying the kind of messaging operation as defined in the
6868
[Operation names](#operation-names) section above.
6969
note: If a custom value is used, it MUST known to be of low cardinality.
70-
- id: batch.size
70+
- id: batch.message_count
7171
type: int
7272
brief: The number of messages sent, received, or processed in the scope of the batching operation.
7373
requirement_level:
7474
conditionally_required: If the span describes operation on a batch of messages.
7575
note: >
76-
Instrumentations SHOULD NOT set `messaging.batch.size` on spans that operate with a single message.
76+
Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message.
7777
When client library supports batch and single-message API for the same operation, instrumentations SHOULD
78-
use `messaging.batch.size` for batching APIs and SHOULD NOT use it for single-message APIs.
78+
use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.
7979
examples: [0, 1, 2]
8080
- ref: messaging.message.id
8181
requirement_level:

specification/trace/semantic_conventions/messaging.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The following operations related to messages are defined for these semantic conv
193193
|---|---|---|---|---|
194194
| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `rocketmq`; `activemq`; `AmazonSQS` | Required |
195195
| `messaging.operation` | string | A string identifying the kind of messaging operation as defined in the [Operation names](#operation-names) section above. [1] | `publish` | Required |
196-
| `messaging.batch.size` | int | The number of messages sent, received, or processed in the scope of the batching operation. [2] | `0`; `1`; `2` | Conditionally Required: [3] |
196+
| `messaging.batch.message_count` | int | The number of messages sent, received, or processed in the scope of the batching operation. [2] | `0`; `1`; `2` | Conditionally Required: [3] |
197197
| `messaging.message.conversation_id` | string | The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". | `MyConversationId` | Recommended: [4] |
198198
| `messaging.message.id` | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | Recommended: [5] |
199199
| `messaging.message.payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. | `2048` | Recommended: [6] |
@@ -208,7 +208,7 @@ The following operations related to messages are defined for these semantic conv
208208

209209
**[1]:** If a custom value is used, it MUST known to be of low cardinality.
210210

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.
211+
**[2]:** Instrumentations SHOULD NOT set `messaging.batch.message_count` 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.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.
212212

213213
**[3]:** If the span describes operation on a batch of messages.
214214

@@ -535,7 +535,7 @@ Process C: | Span Recv1 |
535535
| `messaging.source.kind` | | | `"queue"` | `"queue"` | `"queue"` |
536536
| `messaging.operation` | | | `"receive"` | `"process"` | `"process"` |
537537
| `messaging.message.id` | `"a1"` | `"a2"` | | `"a1"` | `"a2"` |
538-
| `messaging.batch.size` | | | 2 | | |
538+
| `messaging.batch.message_count` | | | 2 | | |
539539

540540
### Batch processing
541541

@@ -572,4 +572,4 @@ Process C: | Span Recv1 | Span Recv2 |
572572
| `messaging.source.kind` | | | `"queue"` | `"queue"` | `"queue"` |
573573
| `messaging.operation` | | | `"receive"` | `"receive"` | `"process"` |
574574
| `messaging.message.id` | `"a1"` | `"a2"` | `"a1"` | `"a2"` | |
575-
| `messaging.batch.size` | | | 1 | 1 | 2 |
575+
| `messaging.batch.message_count` | | | 1 | 1 | 2 |

0 commit comments

Comments
 (0)