|
2 | 2 |
|
3 | 3 | ## Kubernetes Resource Attributes
|
4 | 4 |
|
5 |
| -<!-- semconv registry.k8s --> |
6 |
| -| Attribute | Type | Description | Examples | Requirement Level | |
7 |
| -|---|---|---|---|---| |
8 |
| -| `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | Recommended | |
9 |
| -| `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` | Recommended | |
10 |
| -| `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` | Recommended | |
11 |
| -| `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. | `0`; `2` | Recommended | |
12 |
| -| `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` | Recommended | |
13 |
| -| `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
14 |
| -| `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` | Recommended | |
15 |
| -| `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
16 |
| -| `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` | Recommended | |
17 |
| -| `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
18 |
| -| `k8s.job.name` | string | The name of the Job. | `opentelemetry` | Recommended | |
19 |
| -| `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
20 |
| -| `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | Recommended | |
21 |
| -| `k8s.node.name` | string | The name of the Node. | `node-1` | Recommended | |
22 |
| -| `k8s.node.uid` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` | Recommended | |
23 |
| -| `k8s.pod.labels.<key>` | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | Recommended | |
24 |
| -| `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended | |
25 |
| -| `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
26 |
| -| `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | Recommended | |
27 |
| -| `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
28 |
| -| `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` | Recommended | |
29 |
| -| `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended | |
| 5 | +<!-- semconv registry.k8s(omit_requirement_level) --> |
| 6 | +| Attribute | Type | Description | Examples | |
| 7 | +|---|---|---|---| |
| 8 | +| `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | |
| 9 | +| `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` | |
| 10 | +| `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` | |
| 11 | +| `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. | `0`; `2` | |
| 12 | +| `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` | |
| 13 | +| `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 14 | +| `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` | |
| 15 | +| `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 16 | +| `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` | |
| 17 | +| `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 18 | +| `k8s.job.name` | string | The name of the Job. | `opentelemetry` | |
| 19 | +| `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 20 | +| `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | |
| 21 | +| `k8s.node.name` | string | The name of the Node. | `node-1` | |
| 22 | +| `k8s.node.uid` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` | |
| 23 | +| `k8s.pod.annotation.<key>` | string | The annotation key-value pairs placed on the Pod, the `<key>` being the annotation name, the value being the annotation value. | `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true`; `k8s.pod.annotation.mycompany.io/arch=x64`; `k8s.pod.annotation.data=` | |
| 24 | +| `k8s.pod.labels.<key>` | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | |
| 25 | +| `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | |
| 26 | +| `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 27 | +| `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | |
| 28 | +| `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
| 29 | +| `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` | |
| 30 | +| `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | |
30 | 31 |
|
31 | 32 | **[1]:** K8s doesn't have support for obtaining a cluster ID. If this is ever
|
32 | 33 | added, we will recommend collecting the `k8s.cluster.uid` through the
|
|
0 commit comments