From ae0516ff48f9ec43bc08e87c3d6e3e9bf4fcfc3a Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Thu, 25 Sep 2025 16:05:09 +0200 Subject: [PATCH 1/5] Update peer.* namespace to fit as service.* counterpart This PR renames peer.service to peer.service.name and introduces peer.service.namespace with the intention of supporting match the usage of service.namespace + service.name as identity for services. This PR partly fulfils #2338 --- model/peer/common.yaml | 4 +++- model/peer/registry.yaml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/model/peer/common.yaml b/model/peer/common.yaml index 53807af234..77293f6afa 100644 --- a/model/peer/common.yaml +++ b/model/peer/common.yaml @@ -3,5 +3,7 @@ groups: type: attribute_group brief: "Operations that access some remote service." attributes: - - ref: peer.service + - ref: peer.service.name + requirement_level: recommended + - ref: peer.service.namespace requirement_level: recommended diff --git a/model/peer/registry.yaml b/model/peer/registry.yaml index 7ef6ed7440..cceee7c02b 100644 --- a/model/peer/registry.yaml +++ b/model/peer/registry.yaml @@ -13,3 +13,22 @@ groups: of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. examples: "AuthTokenCache" + deprecated: + reason: renamed + renamed_to: peer.service.name + - id: peer.service.name + type: string + stability: development + brief: > + The [`service.name`](/docs/resource/README.md#service) + of the remote service. SHOULD be equal to the actual `service.name` + resource attribute of the remote service if any. + examples: "shoppingcart" + - id: peer.service.namespace + type: string + stability: development + brief: > + The [`service.namespace`](/docs/resource/README.md#service) + of the remote service. SHOULD be equal to the actual `service.namespace` + resource attribute of the remote service if any. + examples: "Shop" From 16b402dec9295510c6de1eaf9d56027457b74d0b Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Thu, 25 Sep 2025 16:09:07 +0200 Subject: [PATCH 2/5] add changelog entry --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f3c61943..927fafdf61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ # Changelog - +- `peer`: rename `peer.service` to `peer.service.name` and introduce `peer.service.namespace` + to mirror `service.namespace`. ## v1.37.0 From affa56c5505ba7cfcdab53735748046e405aa769 Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Thu, 25 Sep 2025 16:57:14 +0200 Subject: [PATCH 3/5] Registry generation --- docs/registry/attributes/peer.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/registry/attributes/peer.md b/docs/registry/attributes/peer.md index 485cf0e8a1..ef7aaafabb 100644 --- a/docs/registry/attributes/peer.md +++ b/docs/registry/attributes/peer.md @@ -9,4 +9,6 @@ Operations that access some remote service. | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| -| `peer.service` | string | The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `AuthTokenCache` | ![Development](https://img.shields.io/badge/-development-blue) | +| `peer.service` | string | The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `AuthTokenCache` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `peer.service.name`. | +| `peer.service.name` | string | The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `shoppingcart` | ![Development](https://img.shields.io/badge/-development-blue) | +| `peer.service.namespace` | string | The [`service.namespace`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.namespace` resource attribute of the remote service if any. | `Shop` | ![Development](https://img.shields.io/badge/-development-blue) | From a3adbb3b59cfdfa2e2c75b7bdbc3a1cd22510836 Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Thu, 25 Sep 2025 17:04:33 +0200 Subject: [PATCH 4/5] Fix changelog --- .chloggen/2807-update-peer-namespace.yaml | 13 +++++++++++++ CHANGELOG.md | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .chloggen/2807-update-peer-namespace.yaml diff --git a/.chloggen/2807-update-peer-namespace.yaml b/.chloggen/2807-update-peer-namespace.yaml new file mode 100644 index 0000000000..b8a0167f96 --- /dev/null +++ b/.chloggen/2807-update-peer-namespace.yaml @@ -0,0 +1,13 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement +component: peer +note: Update peer.* namespace to mirror service.*. +issues: [2807] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Rename peer.service to peer.service.name and introduces peer.service.namespace + to support matching the usage of service.namespace + service.name as identity + for services. diff --git a/CHANGELOG.md b/CHANGELOG.md index 927fafdf61..94f3c61943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,7 @@ # Changelog -- `peer`: rename `peer.service` to `peer.service.name` and introduce `peer.service.namespace` - to mirror `service.namespace`. + ## v1.37.0 From 55895947f396dc30f9e64fde45df93a51a96bbdb Mon Sep 17 00:00:00 2001 From: Michele Mancioppi Date: Mon, 29 Sep 2025 08:24:43 +0200 Subject: [PATCH 5/5] Update attributes.md --- docs/general/attributes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/general/attributes.md b/docs/general/attributes.md index 47ce21231a..f0edf3dbf7 100644 --- a/docs/general/attributes.md +++ b/docs/general/attributes.md @@ -368,7 +368,8 @@ Instrumentations SHOULD provide a way for users to configure this name. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`peer.service`](/docs/registry/attributes/peer.md) | string | The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `AuthTokenCache` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`peer.service.name`](/docs/registry/attributes/peer.md) | string | The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `shoppingcart` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`peer.service.namespace`](/docs/registry/attributes/peer.md) | string | The [`service.namespace`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.namespace` resource attribute of the remote service if any. | `Shop` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |