Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ release.
([#503](https://github.com/open-telemetry/semantic-conventions/pull/503))
- Add Semantic conventions for TLS/SSL encrypted communication.
([#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

Expand Down Expand Up @@ -123,7 +125,7 @@ stabilized.

- 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
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
([#215](https://github.com/open-telemetry/semantic-conventions/pull/215))
alevenberg marked this conversation as resolved.
Show resolved Hide resolved
- Add `container.labels.<key>` attributes.
([#125](https://github.com/open-telemetry/semantic-conventions/pull/125))
- Add `cluster.name` and `node.name` attributes to Elasticsearch semantic conventions.
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ make misspell-correction

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
won't count).
* 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
- 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
the trivial updates, such like typo, cosmetic, rebase, etc.). This gives
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.

Any [maintainer](./README.md#contributing) can merge the PR once it is **ready
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_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.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` |
alevenberg marked this conversation as resolved.
Show resolved Hide resolved
| `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.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` |
Expand Down
9 changes: 9 additions & 0 deletions docs/messaging/gcp-pubsub.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`.

## 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
5 changes: 5 additions & 0 deletions model/registry/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ groups:
brief: >
Namespace of RocketMQ resources, resources in different namespaces are individual.
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
brief: >
An identifier for the messaging system being used. See below for a list of well-known identifiers.
Expand Down
10 changes: 10 additions & 0 deletions model/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,13 @@ groups:
tag: tech-specific-rocketmq
- ref: messaging.rocketmq.consumption_model
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
alevenberg marked this conversation as resolved.
Show resolved Hide resolved
tag: tech-specific-gcp-pubsub
requirement_level:
conditionally_required: If the message type has an ordering key set.
Loading