Skip to content

Commit

Permalink
Merge branch 'main' into container_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWert authored Mar 13, 2024
2 parents f946775 + e74c998 commit 95d3d4c
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .chloggen/798.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: breaking
component: messaging
note: Introduce common `messaging.destination.partition.id` instead of `messaging.kafka.destination.partition`
issues: [798]
12 changes: 10 additions & 2 deletions docs/attributes-registry/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [RocketMQ Attributes](#rocketmq-attributes)
- [Azure Event Hubs Attributes](#azure-event-hubs-attributes)
- [Azure Service Bus Attributes](#azure-service-bus-attributes)
- [Deprecated Messaging Attributes](#deprecated-messaging-attributes)

<!-- tocstop -->

Expand All @@ -24,6 +25,7 @@
| `messaging.client_id` | string | A unique identifier for the client that consumes or produces a message. | `client-5`; `myhost@8742@s8083jm` |
| `messaging.destination.anonymous` | boolean | A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). | |
| `messaging.destination.name` | string | The message destination name [2] | `MyQueue`; `MyTopic` |
| `messaging.destination.partition.id` | string | The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. | `1` |
| `messaging.destination.template` | string | Low cardinality representation of the messaging destination name [3] | `/customers/{customerId}` |
| `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). | |
Expand Down Expand Up @@ -93,7 +95,6 @@ size should be used.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `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. [1] | `myKey` |
| `messaging.kafka.message.offset` | int | The offset of a record in the corresponding Kafka partition. | `42` |
| `messaging.kafka.message.tombstone` | boolean | A boolean that is true if the message is a tombstone. | |
Expand Down Expand Up @@ -148,7 +149,6 @@ size should be used.
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `messaging.eventhubs.consumer.group` | string | The name of the consumer group the event consumer is associated with. | `indexer` |
| `messaging.eventhubs.destination.partition.id` | string | The identifier of the partition messages are sent to or received from, unique to the Event Hub which contains it. | `1` |
| `messaging.eventhubs.message.enqueued_time` | int | The UTC epoch seconds at which the message has been accepted and stored in the entity. | `1701393730` |
<!-- endsemconv -->

Expand All @@ -171,3 +171,11 @@ size should be used.
| `dead_letter` | Message is sent to dead letter queue |
| `defer` | Message is deferred |
<!-- endsemconv -->

## Deprecated Messaging Attributes

<!-- semconv attributes.messaging.deprecated(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `messaging.kafka.destination.partition` | int | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>"Deprecated, use `messaging.destination.partition.id` instead." | `2` |
<!-- endsemconv -->
2 changes: 1 addition & 1 deletion docs/messaging/azure-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ The following additional attributes are defined:
<!-- semconv messaging.eventhubs -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`messaging.destination.partition.id`](../attributes-registry/messaging.md) | string | "String representation of the partition id messages are sent to or received from, unique within the Event Hub." | `1` | Conditionally Required: If available. |
| [`messaging.eventhubs.consumer.group`](../attributes-registry/messaging.md) | string | The name of the consumer group the event consumer is associated with. | `indexer` | Conditionally Required: If not default ("$Default"). |
| [`messaging.eventhubs.destination.partition.id`](../attributes-registry/messaging.md) | string | The identifier of the partition messages are sent to or received from, unique to the Event Hub which contains it. | `1` | Conditionally Required: If available. |
| [`messaging.eventhubs.message.enqueued_time`](../attributes-registry/messaging.md) | int | The UTC epoch seconds at which the message has been accepted and stored in the entity. | `1701393730` | Recommended |
<!-- endsemconv -->

Expand Down
2 changes: 1 addition & 1 deletion docs/messaging/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ For Apache Kafka, the following additional attributes are defined:
<!-- semconv messaging.kafka(full,tag=tech-specific-kafka) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`messaging.destination.partition.id`](../attributes-registry/messaging.md) | string | "String representation of the partition id the message (or batch) is sent to or received from."" | `1` | Recommended |
| [`messaging.kafka.consumer.group`](../attributes-registry/messaging.md) | string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. | `my-group` | Recommended |
| [`messaging.kafka.destination.partition`](../attributes-registry/messaging.md) | int | Partition the message is sent to. | `2` | Recommended |
| [`messaging.kafka.message.key`](../attributes-registry/messaging.md) | 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. [1] | `myKey` | Recommended |
| [`messaging.kafka.message.offset`](../attributes-registry/messaging.md) | int | The offset of a record in the corresponding Kafka partition. | `42` | Recommended |
| [`messaging.kafka.message.tombstone`](../attributes-registry/messaging.md) | boolean | A boolean that is true if the message is a tombstone. | | Conditionally Required: [2] |
Expand Down
11 changes: 11 additions & 0 deletions model/registry/deprecated/messaging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- id: attributes.messaging.deprecated
type: attribute_group
brief: "Describes deprecated messaging attributes."
attributes:
- id: messaging.kafka.destination.partition
type: int
brief: >
"Deprecated, use `messaging.destination.partition.id` instead."
examples: 2
deprecated: "Replaced by `messaging.destination.partition.id`."
23 changes: 8 additions & 15 deletions model/registry/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ groups:
the broker doesn't have such notion, the original destination name SHOULD uniquely identify the broker.
examples: ['MyQueue', 'MyTopic']
tag: messaging-generic
- id: destination.partition.id
type: string
stability: experimental
brief: >
The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`.
examples: '1'
tag: messaging-generic
- id: kafka.consumer.group
type: string
stability: experimental
Expand All @@ -74,13 +81,6 @@ groups:
Only applies to consumers, not producers.
examples: 'my-group'
tag: tech-specific-kafka
- id: kafka.destination.partition
type: int
stability: experimental
brief: >
Partition the message is sent to.
examples: 2
tag: tech-specific-kafka
- id: kafka.message.key
type: string
stability: experimental
Expand Down Expand Up @@ -273,7 +273,7 @@ groups:
type: string
stability: experimental
brief: >
The ordering key for a given message. If the attribute is not present, the message does not have an ordering key.
The ordering key for a given message. If the attribute is not present, the message does not have an ordering key.
examples: 'ordering_key'
tag: tech-specific-gcp-pubsub
- id: system
Expand Down Expand Up @@ -362,13 +362,6 @@ groups:
The UTC epoch seconds at which the message has been accepted and stored in the entity.
examples: 1701393730
tag: tech-specific-eventhubs
- id: eventhubs.destination.partition.id
type: string
stability: experimental
brief: >
The identifier of the partition messages are sent to or received from, unique to the Event Hub which contains it.
examples: '1'
tag: tech-specific-eventhubs
- id: eventhubs.consumer.group
type: string
stability: experimental
Expand Down
12 changes: 8 additions & 4 deletions model/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ groups:
brief: >
Attributes for Apache Kafka
attributes:
- ref: messaging.destination.partition.id
brief: >
"String representation of the partition id the message (or batch) is sent to or received from.""
tag: tech-specific-kafka
- ref: messaging.kafka.message.key
tag: tech-specific-kafka
- ref: messaging.kafka.consumer.group
tag: tech-specific-kafka
- ref: messaging.kafka.destination.partition
tag: tech-specific-kafka
- ref: messaging.kafka.message.offset
tag: tech-specific-kafka
- ref: messaging.kafka.message.tombstone
Expand Down Expand Up @@ -186,10 +188,12 @@ groups:
brief: >
Attributes for Azure Event Hubs
attributes:
- ref: messaging.eventhubs.message.enqueued_time
- ref: messaging.eventhubs.destination.partition.id
- ref: messaging.destination.partition.id
brief: >
"String representation of the partition id messages are sent to or received from, unique within the Event Hub."
requirement_level:
conditionally_required: If available.
- ref: messaging.eventhubs.message.enqueued_time
- ref: messaging.eventhubs.consumer.group
requirement_level:
conditionally_required: If not default ("$Default").
6 changes: 6 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/next
versions:
next:
spans:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/798
- rename_attributes:
attribute_map:
messaging.kafka.destination.partition: messaging.destination.partition.id
metrics:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/484
Expand Down

0 comments on commit 95d3d4c

Please sign in to comment.