From 1df3be86fc14cce3f31331a5a0fe8b467d3e1bee Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Fri, 16 Aug 2024 11:24:43 -0500 Subject: [PATCH 01/17] k8s: add CSI driver attributes --- .chloggen/add_k8s_csi_attributes.yaml | 5 +++++ docs/attributes-registry/k8s.md | 10 ++++++++-- model/registry/k8s.yaml | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .chloggen/add_k8s_csi_attributes.yaml diff --git a/.chloggen/add_k8s_csi_attributes.yaml b/.chloggen/add_k8s_csi_attributes.yaml new file mode 100644 index 0000000000..8715675f67 --- /dev/null +++ b/.chloggen/add_k8s_csi_attributes.yaml @@ -0,0 +1,5 @@ +change_type: enhancement +component: k8s +note: Add `csi.driver` and `csi.volume.handle` attributes. +issues: [1119] +subtext: diff --git a/docs/attributes-registry/k8s.md b/docs/attributes-registry/k8s.md index 6f4bf8cafe..268cb6f584 100644 --- a/docs/attributes-registry/k8s.md +++ b/docs/attributes-registry/k8s.md @@ -15,8 +15,10 @@ Kubernetes resource attributes. | Attribute | Type | Description | Examples | Stability | | --------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| `csi.driver` | string | The name of the CSI driver used by the volume. [1] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `csi.volume.handle` | string | The unique volume name returned by the CSI volume plugin's CreateVolume. [2] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [3] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.name` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.restart_count` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.status.last_terminated_reason` | string | Last terminated reason of the Container. | `Evicted`; `Error` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -42,7 +44,11 @@ Kubernetes resource attributes. | `k8s.volume.name` | string | The name of the K8s volume. | `volume0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.volume.type` | string | The type of the K8s volume. | `emptyDir`; `persistentVolumeClaim` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** K8s doesn't have support for obtaining a cluster ID. If this is ever +**[1]:** This maps 1:1 to [CSIPersistentVolumeSource.driver](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). + +**[2]:** This maps 1:1 to [CSIPersistentVolumeSource.volumeHandle](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). + +**[3]:** K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will recommend collecting the `k8s.cluster.uid` through the official APIs. In the meantime, we are able to use the `uid` of the `kube-system` namespace as a proxy for cluster ID. Read on for the diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index 6767f3575e..9c88c3a577 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -214,3 +214,21 @@ groups: value: 'local' brief: "A [local](https://v1-29.docs.kubernetes.io/docs/concepts/storage/volumes/#local) volume" stability: experimental + - id: csi.driver + type: string + stability: experimental + brief: > + The name of the CSI driver used by the volume. + note: > + This maps 1:1 to [CSIPersistentVolumeSource.driver](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). + examples: + - "pd.csi.storage.gke.io" + - id: csi.volume.handle + type: string + stability: experimental + brief: > + The unique volume name returned by the CSI volume plugin's CreateVolume. + note: > + This maps 1:1 to [CSIPersistentVolumeSource.volumeHandle](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). + examples: + - "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" From b27dfa540e460ece9a616af42b686983b9bdc7fe Mon Sep 17 00:00:00 2001 From: Greg <2582552+gdvalle@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:57:30 -0500 Subject: [PATCH 02/17] Update model/registry/k8s.yaml Co-authored-by: Joshua MacDonald --- model/registry/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index 9c88c3a577..ccc915fc5f 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -227,7 +227,7 @@ groups: type: string stability: experimental brief: > - The unique volume name returned by the CSI volume plugin's CreateVolume. + The unique volume name returned by the Container Storage Interface (CSI) volume plugin's CreateVolume. note: > This maps 1:1 to [CSIPersistentVolumeSource.volumeHandle](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). examples: From 2069ea85665233ec8da04fac6d498f76428480a2 Mon Sep 17 00:00:00 2001 From: Greg <2582552+gdvalle@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:57:36 -0500 Subject: [PATCH 03/17] Update model/registry/k8s.yaml Co-authored-by: Joshua MacDonald --- model/registry/k8s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index ccc915fc5f..c959851767 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -218,7 +218,7 @@ groups: type: string stability: experimental brief: > - The name of the CSI driver used by the volume. + The name of the Container Storage Interface (CSI) driver used by the volume. note: > This maps 1:1 to [CSIPersistentVolumeSource.driver](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). examples: From c352b3de8eee816867a2c653fa4b3ab551f28f8c Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Fri, 30 Aug 2024 17:03:22 -0500 Subject: [PATCH 04/17] put CSI into its own component, ref from k8s --- .chloggen/add_csi_component.yaml | 7 +++++++ .chloggen/add_k8s_csi_attributes.yaml | 5 ----- model/registry/csi.yaml | 27 +++++++++++++++++++++++++++ model/registry/k8s.yaml | 22 ++++------------------ 4 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .chloggen/add_csi_component.yaml delete mode 100644 .chloggen/add_k8s_csi_attributes.yaml create mode 100644 model/registry/csi.yaml diff --git a/.chloggen/add_csi_component.yaml b/.chloggen/add_csi_component.yaml new file mode 100644 index 0000000000..0d6367c9a1 --- /dev/null +++ b/.chloggen/add_csi_component.yaml @@ -0,0 +1,7 @@ +change_type: new_component +component: csi +note: > + Add CSI attribute group to registry with `csi.plugin.name` and `csi.volume.id` attributes. + Add `csi.plugin.name` and `csi.volume.id` attributes to k8s attributes. +issues: [1119] +subtext: diff --git a/.chloggen/add_k8s_csi_attributes.yaml b/.chloggen/add_k8s_csi_attributes.yaml deleted file mode 100644 index 8715675f67..0000000000 --- a/.chloggen/add_k8s_csi_attributes.yaml +++ /dev/null @@ -1,5 +0,0 @@ -change_type: enhancement -component: k8s -note: Add `csi.driver` and `csi.volume.handle` attributes. -issues: [1119] -subtext: diff --git a/model/registry/csi.yaml b/model/registry/csi.yaml new file mode 100644 index 0000000000..9cb7f5d713 --- /dev/null +++ b/model/registry/csi.yaml @@ -0,0 +1,27 @@ +groups: + - id: registry.csi + type: attribute_group + display_name: Container Storage Interface (CSI) Attributes + brief: > + Attributes related to the Container Storage Interface (CSI). + attributes: + - id: csi.plugin.name + type: string + stability: experimental + brief: > + The name of the CSI plugin used by the volume. + note: > + This can sometimes be referred to as a "driver" in CSI implementations. + This should represent the `name` field of the GetPluginInfo RPC. + examples: + - "pd.csi.storage.gke.io" + - id: csi.volume.id + type: string + stability: experimental + brief: > + The unique volume ID returned by the CSI plugin. + note: > + This can sometimes be referred to as a "volume handle" in CSI implementations. + This should represent the `Volume.volume_id` field in CSI spec. + examples: + - "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index c959851767..a1afd739bb 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -214,21 +214,7 @@ groups: value: 'local' brief: "A [local](https://v1-29.docs.kubernetes.io/docs/concepts/storage/volumes/#local) volume" stability: experimental - - id: csi.driver - type: string - stability: experimental - brief: > - The name of the Container Storage Interface (CSI) driver used by the volume. - note: > - This maps 1:1 to [CSIPersistentVolumeSource.driver](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). - examples: - - "pd.csi.storage.gke.io" - - id: csi.volume.handle - type: string - stability: experimental - brief: > - The unique volume name returned by the Container Storage Interface (CSI) volume plugin's CreateVolume. - note: > - This maps 1:1 to [CSIPersistentVolumeSource.volumeHandle](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). - examples: - - "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" + - ref: csi.plugin.name + requirement_level: recommended + - ref: csi.volume.id + requirement_level: recommended From 9707599543da0cdceca76612a3ed27ab4e9b8d44 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 08:11:28 -0500 Subject: [PATCH 05/17] remove csi from k8s, doesn't go here --- model/registry/k8s.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/model/registry/k8s.yaml b/model/registry/k8s.yaml index a1afd739bb..6767f3575e 100644 --- a/model/registry/k8s.yaml +++ b/model/registry/k8s.yaml @@ -214,7 +214,3 @@ groups: value: 'local' brief: "A [local](https://v1-29.docs.kubernetes.io/docs/concepts/storage/volumes/#local) volume" stability: experimental - - ref: csi.plugin.name - requirement_level: recommended - - ref: csi.volume.id - requirement_level: recommended From 5e860064d5dd7d5ff7ef584c7852d5687a11f2f8 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 08:20:04 -0500 Subject: [PATCH 06/17] make fix generate-gh-issue-templates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 ++- .github/ISSUE_TEMPLATE/change_proposal.yaml | 3 ++- .github/ISSUE_TEMPLATE/new-conventions.yaml | 3 ++- docs/attributes-registry/README.md | 1 + docs/attributes-registry/csi.md | 20 ++++++++++++++++++++ docs/attributes-registry/k8s.md | 10 ++-------- 6 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 docs/attributes-registry/csi.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e808ec4b1e..fe66b0b7d6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,11 +28,12 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:cpu + - area:csi - area:db - area:deployment - area:destination diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 6717c98fba..2867d47c2c 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,11 +20,12 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:cpu + - area:csi - area:db - area:deployment - area:destination diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 5df4d54de4..467af40779 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,11 +29,12 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents + - area:cloud - area:code - area:container - area:cpu + - area:csi - area:db - area:deployment - area:destination diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 2a3894f1b7..019d6d6beb 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -44,6 +44,7 @@ Currently, the following namespaces exist: - [Code](code.md) - [Container](container.md) - [CPU](cpu.md) +- [Csi](csi.md) - [Db](db.md) - [Deployment](deployment.md) - [Destination](destination.md) diff --git a/docs/attributes-registry/csi.md b/docs/attributes-registry/csi.md new file mode 100644 index 0000000000..62ec017f05 --- /dev/null +++ b/docs/attributes-registry/csi.md @@ -0,0 +1,20 @@ + + + + + +# Csi + +## Container Storage Interface (CSI) Attributes + +Attributes related to the Container Storage Interface (CSI). + +| Attribute | Type | Description | Examples | Stability | +| ----------------- | ------ | ---------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- | +| `csi.plugin.name` | string | The name of the CSI plugin used by the volume. [1] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `csi.volume.id` | string | The unique volume ID returned by the CSI plugin. [2] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC. + +**[2]:** This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec. diff --git a/docs/attributes-registry/k8s.md b/docs/attributes-registry/k8s.md index 268cb6f584..6f4bf8cafe 100644 --- a/docs/attributes-registry/k8s.md +++ b/docs/attributes-registry/k8s.md @@ -15,10 +15,8 @@ Kubernetes resource attributes. | Attribute | Type | Description | Examples | Stability | | --------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -| `csi.driver` | string | The name of the CSI driver used by the volume. [1] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `csi.volume.handle` | string | The unique volume name returned by the CSI volume plugin's CreateVolume. [2] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [3] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.name` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.restart_count` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.container.status.last_terminated_reason` | string | Last terminated reason of the Container. | `Evicted`; `Error` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -44,11 +42,7 @@ Kubernetes resource attributes. | `k8s.volume.name` | string | The name of the K8s volume. | `volume0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `k8s.volume.type` | string | The type of the K8s volume. | `emptyDir`; `persistentVolumeClaim` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** This maps 1:1 to [CSIPersistentVolumeSource.driver](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). - -**[2]:** This maps 1:1 to [CSIPersistentVolumeSource.volumeHandle](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#csipersistentvolumesource-v1-core). - -**[3]:** K8s doesn't have support for obtaining a cluster ID. If this is ever +**[1]:** K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will recommend collecting the `k8s.cluster.uid` through the official APIs. In the meantime, we are able to use the `uid` of the `kube-system` namespace as a proxy for cluster ID. Read on for the From a0b2262f142db6d79361d6f07bbda2e7100e1ac3 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 08:44:22 -0500 Subject: [PATCH 07/17] remove k8s attr bits from changelog --- .chloggen/add_csi_component.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.chloggen/add_csi_component.yaml b/.chloggen/add_csi_component.yaml index 0d6367c9a1..b87615fe75 100644 --- a/.chloggen/add_csi_component.yaml +++ b/.chloggen/add_csi_component.yaml @@ -2,6 +2,5 @@ change_type: new_component component: csi note: > Add CSI attribute group to registry with `csi.plugin.name` and `csi.volume.id` attributes. - Add `csi.plugin.name` and `csi.volume.id` attributes to k8s attributes. issues: [1119] subtext: From 75a4570a7c45e1ea01d857318160d952f01edeaf Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 08:44:58 -0500 Subject: [PATCH 08/17] clarify this is a new component --- .chloggen/add_csi_component.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_csi_component.yaml b/.chloggen/add_csi_component.yaml index b87615fe75..86d8a52d13 100644 --- a/.chloggen/add_csi_component.yaml +++ b/.chloggen/add_csi_component.yaml @@ -1,6 +1,6 @@ change_type: new_component component: csi note: > - Add CSI attribute group to registry with `csi.plugin.name` and `csi.volume.id` attributes. + Add CSI component to registry with `csi.plugin.name` and `csi.volume.id` attributes. issues: [1119] subtext: From 62ce92d21913529194524a0b2440d1f44c525639 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 08:45:35 -0500 Subject: [PATCH 09/17] simplify changelog note --- .chloggen/add_csi_component.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/add_csi_component.yaml b/.chloggen/add_csi_component.yaml index 86d8a52d13..30efebe66f 100644 --- a/.chloggen/add_csi_component.yaml +++ b/.chloggen/add_csi_component.yaml @@ -1,6 +1,6 @@ change_type: new_component component: csi note: > - Add CSI component to registry with `csi.plugin.name` and `csi.volume.id` attributes. + Add CSI component with `csi.plugin.name` and `csi.volume.id` attributes. issues: [1119] subtext: From 67a2e1dbef4ec9842da837652c5b2651c2d4d3a5 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 10:45:41 -0500 Subject: [PATCH 10/17] Add CSI to acronyms --- templates/registry/markdown/weaver.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/registry/markdown/weaver.yaml b/templates/registry/markdown/weaver.yaml index 0570d9f9f2..ef9bc5c120 100644 --- a/templates/registry/markdown/weaver.yaml +++ b/templates/registry/markdown/weaver.yaml @@ -7,25 +7,26 @@ templates: application_mode: each acronyms: - AI - - iOS - AWS - CICD - CloudEvents - CLR - CPU + - CSI - DynamoDB - ECS - EKS - - GraphQL - - GCP - GCE + - GCP + - GraphQL - HTTP + - iOS - JVM - NodeJS - OCI - - OTel - OpenTracing - OS + - OTel - RabbitMQ - RocketMQ - RPC From 05434b2331f4ce69ad579de17e8bb27290cdf3b7 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 10:46:40 -0500 Subject: [PATCH 11/17] Csi->CSI --- docs/attributes-registry/README.md | 2 +- docs/attributes-registry/csi.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 019d6d6beb..c72e034fb1 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -44,7 +44,7 @@ Currently, the following namespaces exist: - [Code](code.md) - [Container](container.md) - [CPU](cpu.md) -- [Csi](csi.md) +- [CSI](csi.md) - [Db](db.md) - [Deployment](deployment.md) - [Destination](destination.md) diff --git a/docs/attributes-registry/csi.md b/docs/attributes-registry/csi.md index 62ec017f05..13981d273b 100644 --- a/docs/attributes-registry/csi.md +++ b/docs/attributes-registry/csi.md @@ -4,7 +4,7 @@ -# Csi +# CSI ## Container Storage Interface (CSI) Attributes From da3edad0bccfcb131fc314665ef8ab319668c808 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 4 Sep 2024 11:37:55 -0500 Subject: [PATCH 12/17] manually fix sort order --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/change_proposal.yaml | 2 +- .github/ISSUE_TEMPLATE/new-conventions.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index fe66b0b7d6..0b2798a03f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,8 +28,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 2867d47c2c..406914a89c 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,8 +20,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 467af40779..04173433ee 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,8 +29,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu From ba336ad648fa61270c7618fdd6f409b0f201919c Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 18 Sep 2024 15:38:30 -0500 Subject: [PATCH 13/17] move csi attrs underneath container registry --- .chloggen/add_container_csi_attributes.yaml | 7 ++++++ .chloggen/add_csi_component.yaml | 6 ----- model/container/registry.yaml | 20 +++++++++++++++ model/registry/csi.yaml | 27 --------------------- 4 files changed, 27 insertions(+), 33 deletions(-) create mode 100644 .chloggen/add_container_csi_attributes.yaml delete mode 100644 .chloggen/add_csi_component.yaml delete mode 100644 model/registry/csi.yaml diff --git a/.chloggen/add_container_csi_attributes.yaml b/.chloggen/add_container_csi_attributes.yaml new file mode 100644 index 0000000000..8bcfe8a961 --- /dev/null +++ b/.chloggen/add_container_csi_attributes.yaml @@ -0,0 +1,7 @@ +change_type: enhancement +component: container +note: >- + Add CSI (Container Storage Interface) attributes: + `container.csi.plugin.name` and `container.csi.volume.id`. +issues: [1119] +subtext: diff --git a/.chloggen/add_csi_component.yaml b/.chloggen/add_csi_component.yaml deleted file mode 100644 index 30efebe66f..0000000000 --- a/.chloggen/add_csi_component.yaml +++ /dev/null @@ -1,6 +0,0 @@ -change_type: new_component -component: csi -note: > - Add CSI component with `csi.plugin.name` and `csi.volume.id` attributes. -issues: [1119] -subtext: diff --git a/model/container/registry.yaml b/model/container/registry.yaml index 090c7bddff..85efbd0709 100644 --- a/model/container/registry.yaml +++ b/model/container/registry.yaml @@ -99,3 +99,23 @@ groups: brief: > Container labels, `` being the label name, the value being the label value. examples: [ 'container.label.app=nginx' ] + - id: container.csi.plugin.name + type: string + stability: experimental + brief: > + The name of the CSI (Container Storage Interface) plugin used by the volume. + note: > + This can sometimes be referred to as a "driver" in CSI implementations. + This should represent the `name` field of the GetPluginInfo RPC. + examples: + - "pd.csi.storage.gke.io" + - id: container.csi.volume.id + type: string + stability: experimental + brief: > + The unique volume ID returned by the CSI (Container Storage Interface) plugin. + note: > + This can sometimes be referred to as a "volume handle" in CSI implementations. + This should represent the `Volume.volume_id` field in CSI spec. + examples: + - "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" diff --git a/model/registry/csi.yaml b/model/registry/csi.yaml deleted file mode 100644 index 9cb7f5d713..0000000000 --- a/model/registry/csi.yaml +++ /dev/null @@ -1,27 +0,0 @@ -groups: - - id: registry.csi - type: attribute_group - display_name: Container Storage Interface (CSI) Attributes - brief: > - Attributes related to the Container Storage Interface (CSI). - attributes: - - id: csi.plugin.name - type: string - stability: experimental - brief: > - The name of the CSI plugin used by the volume. - note: > - This can sometimes be referred to as a "driver" in CSI implementations. - This should represent the `name` field of the GetPluginInfo RPC. - examples: - - "pd.csi.storage.gke.io" - - id: csi.volume.id - type: string - stability: experimental - brief: > - The unique volume ID returned by the CSI plugin. - note: > - This can sometimes be referred to as a "volume handle" in CSI implementations. - This should represent the `Volume.volume_id` field in CSI spec. - examples: - - "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" From 08daa791de92b5164e3e98dda5acfa07e09c1a6c Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Wed, 18 Sep 2024 15:45:48 -0500 Subject: [PATCH 14/17] make --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 - .github/ISSUE_TEMPLATE/change_proposal.yaml | 1 - .github/ISSUE_TEMPLATE/new-conventions.yaml | 1 - docs/attributes-registry/README.md | 1 - docs/attributes-registry/container.md | 14 ++++++++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1230b9234b..d0efd84320 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -33,7 +33,6 @@ body: - area:code - area:container - area:cpu - - area:csi - area:db - area:deployment - area:destination diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 82bca8e58c..206cc1c715 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -25,7 +25,6 @@ body: - area:code - area:container - area:cpu - - area:csi - area:db - area:deployment - area:destination diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 1c8762c0bc..1c9cfe8ef9 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -34,7 +34,6 @@ body: - area:code - area:container - area:cpu - - area:csi - area:db - area:deployment - area:destination diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index f5923d1b9c..b5688cac23 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -44,7 +44,6 @@ Currently, the following namespaces exist: - [Code](code.md) - [Container](container.md) - [CPU](cpu.md) -- [CSI](csi.md) - [Db](db.md) - [Deployment](deployment.md) - [Destination](destination.md) diff --git a/docs/attributes-registry/container.md b/docs/attributes-registry/container.md index 187f973818..34c6130af7 100644 --- a/docs/attributes-registry/container.md +++ b/docs/attributes-registry/container.md @@ -18,10 +18,12 @@ A container instance. | `container.command` | string | The command used to run the container (i.e. the command name). [1] | `otelcontribcol` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. [2] | `["otelcontribcol", "--config", "config.yaml"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.command_line` | string | The full command run by the container as a single string representing the full command. [2] | `otelcontribcol --config config.yaml` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.csi.plugin.name` | string | The name of the CSI (Container Storage Interface) plugin used by the volume. [2] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.csi.volume.id` | string | The unique volume ID returned by the CSI (Container Storage Interface) plugin. [3] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.id` | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [2] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [4] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.image.repo_digests` | string[] | Repo digests of the container image as provided by the container runtime. [3] | `["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.image.repo_digests` | string[] | Repo digests of the container image as provided by the container runtime. [5] | `["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.image.tags` | string[] | Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. | `["v1.27.1", "3.5.7-0"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.label.` | string | Container labels, `` being the label name, the value being the label value. | `container.label.app=nginx` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -29,11 +31,15 @@ A container instance. **[1]:** If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. -**[2]:** Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. +**[2]:** This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC. + +**[3]:** This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec. + +**[4]:** Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. -**[3]:** [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. +**[5]:** [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. ## Deprecated Container Attributes From 90150cf5bff00713bf147d7d6660ec64dd94cafc Mon Sep 17 00:00:00 2001 From: Greg <2582552+gdvalle@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:39:09 -0500 Subject: [PATCH 15/17] link to CSI spec Co-authored-by: Christos Markou --- model/container/registry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/container/registry.yaml b/model/container/registry.yaml index 85efbd0709..06a2f34027 100644 --- a/model/container/registry.yaml +++ b/model/container/registry.yaml @@ -103,7 +103,7 @@ groups: type: string stability: experimental brief: > - The name of the CSI (Container Storage Interface) plugin used by the volume. + The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. note: > This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC. From cefc652ef401ec5c270106ae05746f01970707d0 Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Fri, 20 Sep 2024 08:39:45 -0500 Subject: [PATCH 16/17] remove erroneous generated file --- docs/attributes-registry/csi.md | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/attributes-registry/csi.md diff --git a/docs/attributes-registry/csi.md b/docs/attributes-registry/csi.md deleted file mode 100644 index 13981d273b..0000000000 --- a/docs/attributes-registry/csi.md +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -# CSI - -## Container Storage Interface (CSI) Attributes - -Attributes related to the Container Storage Interface (CSI). - -| Attribute | Type | Description | Examples | Stability | -| ----------------- | ------ | ---------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- | -| `csi.plugin.name` | string | The name of the CSI plugin used by the volume. [1] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `csi.volume.id` | string | The unique volume ID returned by the CSI plugin. [2] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -**[1]:** This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC. - -**[2]:** This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec. From 1e24818e6b9038998996a110e085893eefa636ae Mon Sep 17 00:00:00 2001 From: Greg Dallavalle Date: Fri, 20 Sep 2024 08:40:17 -0500 Subject: [PATCH 17/17] link in both attrs, run make --- docs/attributes-registry/container.md | 4 ++-- model/container/registry.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/container.md b/docs/attributes-registry/container.md index 34c6130af7..6d11f90f6f 100644 --- a/docs/attributes-registry/container.md +++ b/docs/attributes-registry/container.md @@ -18,8 +18,8 @@ A container instance. | `container.command` | string | The command used to run the container (i.e. the command name). [1] | `otelcontribcol` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.command_args` | string[] | All the command arguments (including the command/executable itself) run by the container. [2] | `["otelcontribcol", "--config", "config.yaml"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.command_line` | string | The full command run by the container as a single string representing the full command. [2] | `otelcontribcol --config config.yaml` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.csi.plugin.name` | string | The name of the CSI (Container Storage Interface) plugin used by the volume. [2] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `container.csi.volume.id` | string | The unique volume ID returned by the CSI (Container Storage Interface) plugin. [3] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.csi.plugin.name` | string | The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. [2] | `pd.csi.storage.gke.io` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `container.csi.volume.id` | string | The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. [3] | `projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.id` | string | Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.image.id` | string | Runtime specific image identifier. Usually a hash algorithm followed by a UUID. [4] | `sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/container/registry.yaml b/model/container/registry.yaml index 06a2f34027..7b65a37b03 100644 --- a/model/container/registry.yaml +++ b/model/container/registry.yaml @@ -113,7 +113,7 @@ groups: type: string stability: experimental brief: > - The unique volume ID returned by the CSI (Container Storage Interface) plugin. + The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. note: > This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec.