docs(messaging): add gcp async batch publish example (#545)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> Co-authored-by: Alex Hong <9397363+hongalex@users.noreply.github.com> Co-authored-by: Johannes Tax <johannes@johannes.tax> Co-authored-by: Josh Suereth <joshuasuereth@google.com> Co-authored-by: Joao Grassi <joao.grassi@dynatrace.com>
This commit is contained in:
parent
aface154c2
commit
de9ef07a0a
|
|
@ -18,6 +18,8 @@ release.
|
||||||
|
|
||||||
- Add `azure_container_apps` to `cloud.platform` semantic conventions
|
- Add `azure_container_apps` to `cloud.platform` semantic conventions
|
||||||
([#615](https://github.com/open-telemetry/semantic-conventions/pull/615))
|
([#615](https://github.com/open-telemetry/semantic-conventions/pull/615))
|
||||||
|
- Add an example for gcp_pubsub asynchronous batch publish
|
||||||
|
([#545](https://github.com/open-telemetry/semantic-conventions/pull/545)).
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,42 @@ For Google Cloud Pub/Sub, the following additional attributes are defined:
|
||||||
| [`messaging.gcp_pubsub.message.ordering_key`](../attributes-registry/messaging.md) | string | The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. | `ordering_key` | Conditionally Required: If the message type has an ordering key set. |
|
| [`messaging.gcp_pubsub.message.ordering_key`](../attributes-registry/messaging.md) | string | The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. | `ordering_key` | Conditionally Required: If the message type has an ordering key set. |
|
||||||
<!-- endsemconv -->
|
<!-- endsemconv -->
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Asynchronous Batch Publish Example
|
||||||
|
|
||||||
|
Given is a process P that asynchronously publishes 2 messages in a batch to a topic T on Pub/Sub.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart LR;
|
||||||
|
subgraph PRODUCER
|
||||||
|
direction LR
|
||||||
|
CA[Span Create A]
|
||||||
|
CB[Span Create B]
|
||||||
|
P[Span Publish A B]
|
||||||
|
end
|
||||||
|
CA-. link .-P;
|
||||||
|
CB-. link .-P;
|
||||||
|
|
||||||
|
classDef producer fill:green
|
||||||
|
class P,CA,CB producer
|
||||||
|
classDef normal fill:green
|
||||||
|
class PA,PB,D1 normal
|
||||||
|
linkStyle 0,1 color:green,stroke:green
|
||||||
|
```
|
||||||
|
|
||||||
|
| Field or Attribute | Span Create A | Span Create B | Span Publish A B |
|
||||||
|
|-|-|-|-|
|
||||||
|
| Span name | `T create` | `T create` | `publish` |
|
||||||
|
| Parent | | | |
|
||||||
|
| Links | | | Span Create A, Span Create B |
|
||||||
|
| SpanKind | `PRODUCER` | `PRODUCER` | `CLIENT` |
|
||||||
|
| Status | `Ok` | `Ok` | `Ok` |
|
||||||
|
| `messaging.batch.message_count` | | | 2 |
|
||||||
|
| `messaging.destination.name` | `"T"` | `"T"` | `"T"` |
|
||||||
|
| `messaging.operation` | `"create"` | `"create"` | `"publish"` |
|
||||||
|
| `messaging.message.id` | `"a1"` | `"a2"` | |
|
||||||
|
| `messaging.message.envelope.size` | `1` | `1` | |
|
||||||
|
| `messaging.system` | `"gcp_pubsub"` | `"gcp_pubsub"` | `"gcp_pubsub"` |
|
||||||
|
|
||||||
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
|
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue