docs(messaging): add gcp_pubsub ordering key attribute (#528)

Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
This commit is contained in:
Anna Levenberg 2023-11-19 05:06:31 -05:00 committed by GitHub
parent b5b1e6a020
commit dccfffc9bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 5 deletions

View File

@ -24,6 +24,8 @@ release.
([#503](https://github.com/open-telemetry/semantic-conventions/pull/503)) ([#503](https://github.com/open-telemetry/semantic-conventions/pull/503))
- Add Semantic conventions for TLS/SSL encrypted communication. - Add Semantic conventions for TLS/SSL encrypted communication.
([#21](https://github.com/open-telemetry/semantic-conventions/pull/21)) ([#21](https://github.com/open-telemetry/semantic-conventions/pull/21))
- Add `messaging.gcp_pubsub.message.ordering_key` attribute.
([#528](https://github.com/open-telemetry/semantic-conventions/pull/528))
### Fixes ### Fixes
@ -123,7 +125,7 @@ stabilized.
- Remove experimental Kafka metrics ([#338](https://github.com/open-telemetry/semantic-conventions/pull/338)) - Remove experimental Kafka metrics ([#338](https://github.com/open-telemetry/semantic-conventions/pull/338))
- Adds `session.id` and session.md to general docs and model - Adds `session.id` and session.md to general docs and model
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215)) ([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
- Add `container.labels.<key>` attributes. - Add `container.labels.<key>` attributes.
([#125](https://github.com/open-telemetry/semantic-conventions/pull/125)) ([#125](https://github.com/open-telemetry/semantic-conventions/pull/125))
- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions. - Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions.

View File

@ -161,14 +161,14 @@ make misspell-correction
A PR (pull request) is considered to be **ready to merge** when: A PR (pull request) is considered to be **ready to merge** when:
* It has received at least two approvals from the [code - It has received at least two approvals from the [code
owners](./.github/CODEOWNERS) (if approvals are from only one company, they owners](./.github/CODEOWNERS) (if approvals are from only one company, they
won't count). won't count).
* There is no `request changes` from the [code owners](./.github/CODEOWNERS). - There is no `request changes` from the [code owners](./.github/CODEOWNERS).
* It has been at least two working days since the last modification (except for - It has been at least two working days since the last modification (except for
the trivial updates, such like typo, cosmetic, rebase, etc.). This gives the trivial updates, such like typo, cosmetic, rebase, etc.). This gives
people reasonable time to review. people reasonable time to review.
* Trivial changes (typos, cosmetic changes, CI improvements, etc.) don't have to - Trivial changes (typos, cosmetic changes, CI improvements, etc.) don't have to
wait for two days. wait for two days.
Any [maintainer](./README.md#contributing) can merge the PR once it is **ready Any [maintainer](./README.md#contributing) can merge the PR once it is **ready

View File

@ -16,6 +16,7 @@
| `messaging.destination.temporary` | boolean | A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. | | | `messaging.destination.temporary` | boolean | A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. | |
| `messaging.destination_publish.anonymous` | boolean | A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name). | | | `messaging.destination_publish.anonymous` | boolean | A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name). | |
| `messaging.destination_publish.name` | string | The name of the original destination the message was published to [4] | `MyQueue`; `MyTopic` | | `messaging.destination_publish.name` | string | The name of the original destination the message was published to [4] | `MyQueue`; `MyTopic` |
| `messaging.gcp_pubsub.message.ordering_key` | string | The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. | `ordering_key` |
| `messaging.kafka.consumer.group` | string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. | `my-group` | | `messaging.kafka.consumer.group` | string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. | `my-group` |
| `messaging.kafka.destination.partition` | int | Partition the message is sent to. | `2` | | `messaging.kafka.destination.partition` | int | Partition the message is sent to. | `2` |
| `messaging.kafka.message.key` | string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [5] | `myKey` | | `messaging.kafka.message.key` | string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [5] | `myKey` |

View File

@ -10,4 +10,13 @@ The Semantic Conventions for [Google Cloud Pub/Sub](https://cloud.google.com/pub
`messaging.system` MUST be set to `"gcp_pubsub"`. `messaging.system` MUST be set to `"gcp_pubsub"`.
## Span attributes
For Google Cloud Pub/Sub, the following additional attributes are defined:
<!-- semconv messaging.gcp_pubsub(full,tag=tech-specific-gcp-pubsub) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`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 -->
[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

View File

@ -202,6 +202,11 @@ groups:
brief: > brief: >
Namespace of RocketMQ resources, resources in different namespaces are individual. Namespace of RocketMQ resources, resources in different namespaces are individual.
examples: 'myNamespace' examples: 'myNamespace'
- id: gcp_pubsub.message.ordering_key
type: string
brief: >
The ordering key for a given message. If the attribute is not present, the message does not have an ordering key.
examples: 'ordering_key'
- id: system - id: system
brief: > brief: >
An identifier for the messaging system being used. See below for a list of well-known identifiers. An identifier for the messaging system being used. See below for a list of well-known identifiers.

View File

@ -170,3 +170,13 @@ groups:
tag: tech-specific-rocketmq tag: tech-specific-rocketmq
- ref: messaging.rocketmq.consumption_model - ref: messaging.rocketmq.consumption_model
tag: tech-specific-rocketmq tag: tech-specific-rocketmq
- id: messaging.gcp_pubsub
type: attribute_group
extends: messaging
brief: >
Attributes for Google Cloud Pub/Sub
attributes:
- ref: messaging.gcp_pubsub.message.ordering_key
tag: tech-specific-gcp-pubsub
requirement_level:
conditionally_required: If the message type has an ordering key set.