Skip to content

Commit

Permalink
Rename messaging.kafka.message.offset to messaging.kafka.offset (#…
Browse files Browse the repository at this point in the history
…1245)

Co-authored-by: Liudmila Molkova <[email protected]>
  • Loading branch information
pyohannes and lmolkova authored Jul 15, 2024
1 parent 17decc3 commit c06b318
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .chloggen/1156.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
change_type: breaking

component: messaging

note: Rename `messaging.kafka.message.offset` to `messaging.kafka.offset`

issues: [1156]
3 changes: 2 additions & 1 deletion docs/attributes-registry/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ This group describes attributes specific to Apache Kafka.
| Attribute | Type | Description | Examples | Stability |
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------- |
| `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. [11] | `myKey` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `messaging.kafka.message.offset` | int | The offset of a record in the corresponding Kafka partition. | `42` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `messaging.kafka.message.tombstone` | boolean | A boolean that is true if the message is a tombstone. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `messaging.kafka.offset` | int | The offset of a record in the corresponding Kafka partition. | `42` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[11]:** If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.

Expand Down Expand Up @@ -191,6 +191,7 @@ Describes deprecated messaging attributes.
| `messaging.eventhubs.consumer.group` | string | Deprecated, use `messaging.consumer.group.name` instead. | `$Default` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.consumer.group.name`. |
| `messaging.kafka.consumer.group` | string | Deprecated, use `messaging.consumer.group.name` instead. | `my-group` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.consumer.group.name`. |
| `messaging.kafka.destination.partition` | int | Deprecated, use `messaging.destination.partition.id` instead. | `2` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.destination.partition.id`. |
| `messaging.kafka.message.offset` | int | Deprecated, use `messaging.kafka.offset` instead. | `42` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.kafka.offset`. |
| `messaging.operation` | string | Deprecated, use `messaging.operation.type` instead. | `publish`; `create`; `process` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.operation.type`. |
| `messaging.rocketmq.client_group` | string | Deprecated, use `messaging.consumer.group.name` instead. | `myConsumerGroup` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. |
| `messaging.servicebus.destination.subscription_name` | string | Deprecated, use `messaging.servicebus.destination.subscription_name` instead. | `subscription-a` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `messaging.servicebus.destination.subscription_name`. |
2 changes: 1 addition & 1 deletion docs/messaging/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For Apache Kafka, the following additional attributes are defined:
| [`messaging.consumer.group.name`](/docs/attributes-registry/messaging.md) | string | Kafka [consumer group id](https://docs.confluent.io/platform/current/clients/consumer.html). | `my-group`; `indexer` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.destination.partition.id`](/docs/attributes-registry/messaging.md) | string | String representation of the partition id the message (or batch) is sent to or received from. | `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.kafka.message.key`](/docs/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. [9] | `myKey` | `Recommended` If span describes operation on a single message. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.kafka.message.offset`](/docs/attributes-registry/messaging.md) | int | The offset of a record in the corresponding Kafka partition. | `42` | `Recommended` If span describes operation on a single message. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.kafka.offset`](/docs/attributes-registry/messaging.md) | int | The offset of a record in the corresponding Kafka partition. | `42` | `Recommended` If span describes operation on a single message. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.message.body.size`](/docs/attributes-registry/messaging.md) | int | The size of the message body in bytes. [10] | `1439` | `Recommended` If span describes operation on a single message. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`messaging.message.id`](/docs/attributes-registry/messaging.md) | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | `Recommended` If span describes operation on a single message. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [11] | `80`; `8080`; `443` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
Expand Down
8 changes: 8 additions & 0 deletions model/registry/deprecated/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ groups:
examples: 'subscription-a'
deprecated: >
Replaced by `messaging.servicebus.destination.subscription_name`.
- id: messaging.kafka.message.offset
type: int
stability: experimental
brief: >
Deprecated, use `messaging.kafka.offset` instead.
examples: 42
deprecated: >
Replaced by `messaging.kafka.offset`.
2 changes: 1 addition & 1 deletion model/registry/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ groups:
If the key type is not string, it's string representation has to be supplied for the attribute.
If the key has no unambiguous, canonical string form, don't include its value.
examples: 'myKey'
- id: kafka.message.offset
- id: kafka.offset
type: int
stability: experimental
brief: >
Expand Down
2 changes: 1 addition & 1 deletion model/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ groups:
- ref: messaging.kafka.message.key
requirement_level:
recommended: If span describes operation on a single message.
- ref: messaging.kafka.message.offset
- ref: messaging.kafka.offset
requirement_level:
recommended: If span describes operation on a single message.
- ref: messaging.kafka.message.tombstone
Expand Down
4 changes: 4 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ versions:
next:
all:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/1245
- rename_attributes:
attribute_map:
messaging.kafka.message.offset: messaging.kafka.offset
# https://github.com/open-telemetry/semantic-conventions/pull/815
- rename_attributes:
attribute_map:
Expand Down

0 comments on commit c06b318

Please sign in to comment.