Give exhaustive specification of span kinds for messaging spans (#1171)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
This commit is contained in:
parent
f14f54c159
commit
422eeb71f4
|
|
@ -0,0 +1,4 @@
|
|||
change_type: enhancement
|
||||
component: messaging
|
||||
note: Define span kind for unspecified cases of messaging `publish` and `process` spans.
|
||||
issues: [1112]
|
||||
|
|
@ -208,21 +208,13 @@ Span kind SHOULD be set according to the following table, based on the operation
|
|||
|
||||
| Operation type | Span kind|
|
||||
|----------------|-------------|
|
||||
| `create` | `PRODUCER` |
|
||||
| `publish` | `PRODUCER` if the context of the "Publish" span is used as creation context. |
|
||||
| `receive` | `CONSUMER` |
|
||||
| `process` | `CONSUMER` for push-based scenarios where no "Receive" span exists. |
|
||||
| `create` | `PRODUCER` |
|
||||
| `publish` | `PRODUCER` if the context of the "Publish" span is used as creation context, otherwise `CLIENT`. |
|
||||
| `receive` | `CLIENT` |
|
||||
| `process` | `CONSUMER` |
|
||||
|
||||
For cases not covered by the table above, the span kind should be set according
|
||||
to the [generic specification about span kinds](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.35.0/specification/trace/api.md#spankind),
|
||||
e. g. it should be set to CLIENT for the "Publish" span if its context is not
|
||||
used as creation context and if the "Publish" span models a synchronous call to
|
||||
the intermediary.
|
||||
|
||||
Setting span kinds according to this table ensures that span links between
|
||||
consumers and producers always exist between a PRODUCER span on the producer
|
||||
side and a CONSUMER span on the consumer side. This allows analysis tools to
|
||||
interpret linked traces without the need for additional semantic hints.
|
||||
Setting span kinds according to this table allows analysis tools to interpret spans
|
||||
and relationships between them without the need for additional semantic hints.
|
||||
|
||||
### Trace structure
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue