From c06b31850b43ad01c56b66177aa90cca0b9ff50f Mon Sep 17 00:00:00 2001 From: Johannes Tax Date: Mon, 15 Jul 2024 18:47:18 +0200 Subject: [PATCH] Rename `messaging.kafka.message.offset` to `messaging.kafka.offset` (#1245) Co-authored-by: Liudmila Molkova --- .chloggen/1156.yaml | 7 +++++++ docs/attributes-registry/messaging.md | 3 ++- docs/messaging/kafka.md | 2 +- model/registry/deprecated/messaging.yaml | 8 ++++++++ model/registry/messaging.yaml | 2 +- model/trace/messaging.yaml | 2 +- schema-next.yaml | 4 ++++ 7 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 .chloggen/1156.yaml diff --git a/.chloggen/1156.yaml b/.chloggen/1156.yaml new file mode 100644 index 000000000..56ef916b8 --- /dev/null +++ b/.chloggen/1156.yaml @@ -0,0 +1,7 @@ +change_type: breaking + +component: messaging + +note: Rename `messaging.kafka.message.offset` to `messaging.kafka.offset` + +issues: [1156] diff --git a/docs/attributes-registry/messaging.md b/docs/attributes-registry/messaging.md index cf7a11b0b..e670a5e58 100644 --- a/docs/attributes-registry/messaging.md +++ b/docs/attributes-registry/messaging.md @@ -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. @@ -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)
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)
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)
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)
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)
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)
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)
Replaced by `messaging.servicebus.destination.subscription_name`. | diff --git a/docs/messaging/kafka.md b/docs/messaging/kafka.md index b2fd1b4da..2964be5d0 100644 --- a/docs/messaging/kafka.md +++ b/docs/messaging/kafka.md @@ -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) | diff --git a/model/registry/deprecated/messaging.yaml b/model/registry/deprecated/messaging.yaml index c7dd7b05e..f7144862d 100644 --- a/model/registry/deprecated/messaging.yaml +++ b/model/registry/deprecated/messaging.yaml @@ -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`. diff --git a/model/registry/messaging.yaml b/model/registry/messaging.yaml index 1c9fe27be..7a06243fc 100644 --- a/model/registry/messaging.yaml +++ b/model/registry/messaging.yaml @@ -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: > diff --git a/model/trace/messaging.yaml b/model/trace/messaging.yaml index 52bf65c54..0d3c9f067 100644 --- a/model/trace/messaging.yaml +++ b/model/trace/messaging.yaml @@ -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 diff --git a/schema-next.yaml b/schema-next.yaml index b2d310bd7..3539f102a 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -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: