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
|`messaging.deliver.duration`| Histogram |`s`| Measures the duration of deliver operation. |
168
-
<!-- endsemconv -->
169
-
170
-
### Metric: `messaging.deliver.messages`
171
-
172
-
This metric is [required][MetricRequired] for batch delivery operations. It's [opt-in][MetricOptIn] when the messaging system does not support batch delivery since the message count can be derived from the `messaging.deliver.duration` histogram.
173
-
174
-
_Note: The need to report `messaging.deliver.messages` depends on the messaging system capabilities and not application scenarios or client library limitations._
|`messaging.deliver.messages`| Counter |`{message}`| Measures the number of delivered messages. |
180
-
<!-- endsemconv -->
181
-
182
154
### Metric: `messaging.process.duration`
183
155
184
-
This metric is [recommended][MetricRecommended] for processing operations that are initiated by application code.
156
+
This metric is [required][MetricRequired] for operations are not initiated by the application code (push-based deliver), and [recommended](MetricRecommended) for processing operations instrumented for pull-based scenarios.
185
157
186
158
When this metric is reported alongside a messaging process span, the metric value SHOULD be the same as the corresponding span duration.
|`messaging.process.duration`| Histogram |`s`| Measures the duration of process operation. |
167
+
|`messaging.process.duration`| Histogram |`s`| Measures the duration of the process operation. |
196
168
<!-- endsemconv -->
197
169
198
170
### Metric: `messaging.process.messages`
199
171
200
-
This metric is [recommended][MetricRecommended] for batch process operations.
172
+
This metric is [required][MetricRequired] for batch process operations, and [recommended](MetricRecommended) for batch processing operations instrumented for pull-based scenarios. It's [opt-in][MetricOptIn] when the messaging system does not support batch processing since the message count can be derived from the `messaging.process.duration` histogram.
173
+
174
+
_Note: The need to report `messaging.process.messages` depends on the messaging system capabilities and not application scenarios or client library limitations._
Copy file name to clipboardexpand all lines: docs/messaging/messaging-spans.md
+27-28
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ Examples:
191
191
*`shop.orders receive`
192
192
*`shop.orders settle`
193
193
*`print_jobs publish`
194
-
*`topic with spaces deliver`
194
+
*`topic with spaces process`
195
195
*`AuthenticationRequest-Conversations settle`
196
196
*`(anonymous) publish` (`(anonymous)` being a stable identifier for an unnamed destination)
197
197
@@ -206,8 +206,7 @@ The following operations related to messages are defined for these semantic conv
206
206
|`publish`| One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created. |
207
207
|`create`| A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. |
208
208
|`receive`| One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. |
209
-
|`deliver`| One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs. |
210
-
|`process`| One or more messages are processed by consumer. |
209
+
|`process`| One or more messages are delivered to or processed by a consumer. |
211
210
|`settle`| One or more messages are settled. |
212
211
213
212
### Span kind
@@ -220,7 +219,7 @@ SHOULD be set according to the following table, based on the operation a span de
220
219
|`publish`|`PRODUCER` if the context of the "Publish" span is used as creation context. |
221
220
|`create`|`PRODUCER`|
222
221
|`receive`|`CONSUMER`|
223
-
|`deliver`|`CONSUMER`|
222
+
|`process`|`CONSUMER` for push-based scenarios where no `receive` span exists.|
224
223
225
224
For cases not covered by the table above, the span kind should be set according
226
225
to the [generic specification about span kinds](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/trace/api.md#spankind),
@@ -254,29 +253,28 @@ message.
254
253
255
254
#### Consumer spans
256
255
257
-
"Deliver" spans SHOULD be created for operations of passing messages to the
258
-
application when those operations are not initiated by the application code
259
-
(push-based scenarios). A "Deliver" span covers the duration of such an
260
-
operation, which is usually a callback or handler.
261
-
262
256
"Receive" spans SHOULD be created for operations of passing messages to the
263
257
application when those operations are initiated by the application code
264
258
(pull-based scenarios).
265
259
266
-
"Deliver" or "Receive" spans MUST NOT be created for messages that are
260
+
"Process" spans SHOULD be created for operations of passing messages to the
261
+
application when those operations are not initiated by the application code
262
+
(push-based scenarios). Such "Process" span covers the duration of such an
263
+
operation, which is usually a callback or handler.
264
+
265
+
"Process" spans MAY be created in addition to "Receive" spans for pull-based
266
+
scenarios for operations of processing messages. Such spans could be created by
267
+
application code, or by abstraction layers built on top of messaging SDKs.
268
+
269
+
"Receive" or "Process" spans MUST NOT be created for messages that are
267
270
pre-fetched or cached by messaging libraries or SDKs until they are forwarded
268
271
to the caller.
269
272
270
-
A single "Deliver" or "Receive" span can account for a single message, for a
273
+
A single "Process" or "Receive" span can account for a single message, for a
271
274
batch of messages, or for no message at all (if it is signalled that no
272
-
messages were received). For each message it accounts for, the "Deliver" or
275
+
messages were received). For each message it accounts for, the "Process" or
273
276
"Receive" span SHOULD link to the message's creation context.
274
277
275
-
"Process" spans MAY be created in addition to "Deliver" and "Receive" spans,
276
-
for operations of processing a single message or a batch of messages. For each
277
-
message it accounts for, the "Process" span MAY link to the creation context of
278
-
the message.
279
-
280
278
"Settle" spans SHOULD be created for every manually or automatically triggered
281
279
settlement operation. A single "Settle" span can account for a single message
282
280
or for multiple messages (in case messages are passed for settling as batches).
@@ -392,12 +390,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345.
392
390
393
391
`messaging.operation` 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.
394
392
395
-
| Value | Description |
396
-
|---|---|
397
-
|`publish`| One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created. |
398
-
|`create`| A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. |
399
-
|`receive`| One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. |
400
-
|`deliver`| One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs. |
393
+
| Operation name | Description |
394
+
| -------------- | ----------- |
395
+
|`publish`| One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created. |
396
+
|`create`| A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. |
397
+
|`receive`| One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. |
398
+
|`process`| One or more messages are delivered to or processed by a consumer. |
399
+
|`settle`| One or more messages are settled. |
401
400
402
401
`messaging.system` 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.
403
402
@@ -493,11 +492,11 @@ flowchart LR;
493
492
end
494
493
subgraph CONSUMER1
495
494
direction TB
496
-
R1[Span Deliver A 1]
495
+
R1[Span Process A 1]
497
496
end
498
497
subgraph CONSUMER2
499
498
direction TB
500
-
R2[Span Deliver A 2]
499
+
R2[Span Process A 2]
501
500
end
502
501
P-. link .-R1;
503
502
P-. link .-R2;
@@ -507,9 +506,9 @@ flowchart LR;
507
506
linkStyle 0,1 color:green,stroke:green
508
507
```
509
508
510
-
| Field or Attribute | Span Publish A | Span Deliver A 1| Span Deliver A 2 |
509
+
| Field or Attribute | Span Publish A | Span Process A 1| Span Process A 2 |
0 commit comments