K8s
K8s Cluster
Status:
type: k8s.cluster
Description: A Kubernetes Cluster.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.cluster.name | string | The name of the cluster. | opentelemetry-cluster | Recommended | |
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 |
[1] k8s.cluster.uid: 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
rationale.
Every object created in a K8s cluster is assigned a distinct UID. The
kube-system namespace is used by Kubernetes itself and will exist
for the lifetime of the cluster. Using the uid of the kube-system
namespace is a reasonable proxy for the K8s ClusterID as it will only
change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
UUIDs as standardized by
ISO/IEC 9834-8 and ITU-T X.667.
Which states:
If generated according to one of the mechanisms defined in Rec. ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be different from all other UUIDs generated before 3603 A.D., or is extremely likely to be different (depending on the mechanism chosen).
Therefore, UIDs between clusters should be extremely unlikely to conflict.
K8s Container
Status:
type: k8s.container
Description: A container in a PodTemplate.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
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 | |
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. | Recommended | ||
k8s.container.status.last_terminated_reason | string | Last terminated reason of the Container. | Evicted; Error | Recommended |
K8s Cronjob
Status:
type: k8s.cronjob
Description: A Kubernetes CronJob object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.cronjob.name | string | The name of the CronJob. | opentelemetry | Recommended | |
k8s.cronjob.uid | string | The UID of the CronJob. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.cronjob.annotation.<key> | string | The cronjob annotation placed on the CronJob, the <key> being the annotation name, the value being the annotation value. [2] | 4; `` | Opt-In | |
k8s.cronjob.label.<key> | string | The label placed on the CronJob, the <key> being the label name, the value being the label value. [3] | weekly; `` | Opt-In |
[2] k8s.cronjob.annotation.<key>: Examples:
- An annotation
retrieswith value4SHOULD be recorded as thek8s.cronjob.annotation.retriesattribute with value"4". - An annotation
datawith empty string value SHOULD be recorded as thek8s.cronjob.annotation.dataattribute with value"".
[3] k8s.cronjob.label.<key>: Examples:
- A label
typewith valueweeklySHOULD be recorded as thek8s.cronjob.label.typeattribute with value"weekly". - A label
automatedwith empty string value SHOULD be recorded as thek8s.cronjob.label.automatedattribute with value"".
K8s Daemonset
Status:
type: k8s.daemonset
Description: A Kubernetes DaemonSet object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.daemonset.name | string | The name of the DaemonSet. | opentelemetry | Recommended | |
k8s.daemonset.uid | string | The UID of the DaemonSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.daemonset.annotation.<key> | string | The annotation placed on the DaemonSet, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [4] | 1; `` | Opt-In | |
k8s.daemonset.label.<key> | string | The label placed on the DaemonSet, the <key> being the label name, the value being the label value, even if the value is empty. [5] | guestbook; `` | Opt-In |
[4] k8s.daemonset.annotation.<key>: Examples:
- A label
replicaswith value1SHOULD be recorded as thek8s.daemonset.annotation.replicasattribute with value"1". - A label
datawith empty string value SHOULD be recorded as thek8s.daemonset.annotation.dataattribute with value"".
[5] k8s.daemonset.label.<key>: Examples:
- A label
appwith valueguestbookSHOULD be recorded as thek8s.daemonset.label.appattribute with value"guestbook". - A label
datawith empty string value SHOULD be recorded as thek8s.daemonset.label.injectedattribute with value"".
K8s Deployment
Status:
type: k8s.deployment
Description: A Kubernetes Deployment object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.deployment.name | string | The name of the Deployment. | opentelemetry | Recommended | |
k8s.deployment.uid | string | The UID of the Deployment. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.deployment.annotation.<key> | string | The annotation placed on the Deployment, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [6] | 1; `` | Opt-In | |
k8s.deployment.label.<key> | string | The label placed on the Deployment, the <key> being the label name, the value being the label value, even if the value is empty. [7] | guestbook; `` | Opt-In |
[6] k8s.deployment.annotation.<key>: Examples:
- A label
replicaswith value1SHOULD be recorded as thek8s.deployment.annotation.replicasattribute with value"1". - A label
datawith empty string value SHOULD be recorded as thek8s.deployment.annotation.dataattribute with value"".
[7] k8s.deployment.label.<key>: Examples:
- A label
replicaswith value0SHOULD be recorded as thek8s.deployment.label.appattribute with value"guestbook". - A label
injectedwith empty string value SHOULD be recorded as thek8s.deployment.label.injectedattribute with value"".
K8s Hpa
Status:
type: k8s.hpa
Description: A Kubernetes HorizontalPodAutoscaler object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.hpa.name | string | The name of the horizontal pod autoscaler. | opentelemetry | Recommended | |
k8s.hpa.scaletargetref.api_version | string | The API version of the target resource to scale for the HorizontalPodAutoscaler. [8] | apps/v1; autoscaling/v2 | Recommended | |
k8s.hpa.scaletargetref.kind | string | The kind of the target resource to scale for the HorizontalPodAutoscaler. [9] | Deployment; StatefulSet | Recommended | |
k8s.hpa.scaletargetref.name | string | The name of the target resource to scale for the HorizontalPodAutoscaler. [10] | my-deployment; my-statefulset | Recommended | |
k8s.hpa.uid | string | The UID of the horizontal pod autoscaler. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended |
[8] k8s.hpa.scaletargetref.api_version: This maps to the apiVersion field in the scaleTargetRef of the HPA spec.
[9] k8s.hpa.scaletargetref.kind: This maps to the kind field in the scaleTargetRef of the HPA spec.
[10] k8s.hpa.scaletargetref.name: This maps to the name field in the scaleTargetRef of the HPA spec.
K8s Job
Status:
type: k8s.job
Description: A Kubernetes Job object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.job.name | string | The name of the Job. | opentelemetry | Recommended | |
k8s.job.uid | string | The UID of the Job. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.job.annotation.<key> | string | The annotation placed on the Job, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [11] | 1; `` | Opt-In | |
k8s.job.label.<key> | string | The label placed on the Job, the <key> being the label name, the value being the label value, even if the value is empty. [12] | ci; `` | Opt-In |
[11] k8s.job.annotation.<key>: Examples:
- A label
numberwith value1SHOULD be recorded as thek8s.job.annotation.numberattribute with value"1". - A label
datawith empty string value SHOULD be recorded as thek8s.job.annotation.dataattribute with value"".
[12] k8s.job.label.<key>: Examples:
- A label
jobtypewith valueciSHOULD be recorded as thek8s.job.label.jobtypeattribute with value"ci". - A label
datawith empty string value SHOULD be recorded as thek8s.job.label.automatedattribute with value"".
K8s Namespace
Status:
type: k8s.namespace
Description: A Kubernetes Namespace.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.namespace.name | string | The name of the namespace that the pod is running in. | default | Recommended | |
k8s.namespace.annotation.<key> | string | The annotation placed on the Namespace, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [13] | 0; `` | Opt-In | |
k8s.namespace.label.<key> | string | The label placed on the Namespace, the <key> being the label name, the value being the label value, even if the value is empty. [14] | default; `` | Opt-In |
[13] k8s.namespace.annotation.<key>: Examples:
- A label
ttlwith value0SHOULD be recorded as thek8s.namespace.annotation.ttlattribute with value"0". - A label
datawith empty string value SHOULD be recorded as thek8s.namespace.annotation.dataattribute with value"".
[14] k8s.namespace.label.<key>: Examples:
- A label
kubernetes.io/metadata.namewith valuedefaultSHOULD be recorded as thek8s.namespace.label.kubernetes.io/metadata.nameattribute with value"default". - A label
datawith empty string value SHOULD be recorded as thek8s.namespace.label.dataattribute with value"".
K8s Node
Status:
type: k8s.node
Description: A Kubernetes Node object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.node.name | string | The name of the Node. | node-1 | Recommended | |
k8s.node.uid | string | The UID of the Node. | 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2 | Recommended | |
k8s.node.annotation.<key> | string | The annotation placed on the Node, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [15] | 0; `` | Opt-In | |
k8s.node.label.<key> | string | The label placed on the Node, the <key> being the label name, the value being the label value, even if the value is empty. [16] | arm64; `` | Opt-In |
[15] k8s.node.annotation.<key>: Examples:
- An annotation
node.alpha.kubernetes.io/ttlwith value0SHOULD be recorded as thek8s.node.annotation.node.alpha.kubernetes.io/ttlattribute with value"0". - An annotation
datawith empty string value SHOULD be recorded as thek8s.node.annotation.dataattribute with value"".
[16] k8s.node.label.<key>: Examples:
- A label
kubernetes.io/archwith valuearm64SHOULD be recorded as thek8s.node.label.kubernetes.io/archattribute with value"arm64". - A label
datawith empty string value SHOULD be recorded as thek8s.node.label.dataattribute with value"".
K8s Pod
Status:
type: k8s.pod
Description: A Kubernetes Pod object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.pod.name | string | The name of the Pod. | opentelemetry-pod-autoconf | Recommended | |
k8s.pod.uid | string | The UID of the Pod. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.pod.annotation.<key> | string | The annotation placed on the Pod, the <key> being the annotation name, the value being the annotation value. [17] | true; x64; `` | Opt-In | |
k8s.pod.label.<key> | string | The label placed on the Pod, the <key> being the label name, the value being the label value. [18] | my-app; x64; `` | Opt-In |
[17] k8s.pod.annotation.<key>: Examples:
- An annotation
kubernetes.io/enforce-mountable-secretswith valuetrueSHOULD be recorded as thek8s.pod.annotation.kubernetes.io/enforce-mountable-secretsattribute with value"true". - An annotation
mycompany.io/archwith valuex64SHOULD be recorded as thek8s.pod.annotation.mycompany.io/archattribute with value"x64". - An annotation
datawith empty string value SHOULD be recorded as thek8s.pod.annotation.dataattribute with value"".
[18] k8s.pod.label.<key>: Examples:
- A label
appwith valuemy-appSHOULD be recorded as thek8s.pod.label.appattribute with value"my-app". - A label
mycompany.io/archwith valuex64SHOULD be recorded as thek8s.pod.label.mycompany.io/archattribute with value"x64". - A label
datawith empty string value SHOULD be recorded as thek8s.pod.label.dataattribute with value"".
K8s Replicaset
Status:
type: k8s.replicaset
Description: A Kubernetes ReplicaSet object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.replicaset.name | string | The name of the ReplicaSet. | opentelemetry | Recommended | |
k8s.replicaset.uid | string | The UID of the ReplicaSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.replicaset.annotation.<key> | string | The annotation placed on the ReplicaSet, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [19] | 0; `` | Opt-In | |
k8s.replicaset.label.<key> | string | The label placed on the ReplicaSet, the <key> being the label name, the value being the label value, even if the value is empty. [20] | guestbook; `` | Opt-In |
[19] k8s.replicaset.annotation.<key>: Examples:
- A label
replicaswith value0SHOULD be recorded as thek8s.replicaset.annotation.replicasattribute with value"0". - A label
datawith empty string value SHOULD be recorded as thek8s.replicaset.annotation.dataattribute with value"".
[20] k8s.replicaset.label.<key>: Examples:
- A label
appwith valueguestbookSHOULD be recorded as thek8s.replicaset.label.appattribute with value"guestbook". - A label
injectedwith empty string value SHOULD be recorded as thek8s.replicaset.label.injectedattribute with value"".
K8s Replicationcontroller
Status:
type: k8s.replicationcontroller
Description: A Kubernetes ReplicationController object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.replicationcontroller.name | string | The name of the replication controller. | opentelemetry | Recommended | |
k8s.replicationcontroller.uid | string | The UID of the replication controller. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended |
K8s Resourcequota
Status:
type: k8s.resourcequota
Description: A Kubernetes ResourceQuota object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.resourcequota.name | string | The name of the resource quota. | opentelemetry | Recommended | |
k8s.resourcequota.uid | string | The UID of the resource quota. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended |
K8s Statefulset
Status:
type: k8s.statefulset
Description: A Kubernetes StatefulSet object.
Other Attributes:
:warning: This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
k8s.statefulset.name | string | The name of the StatefulSet. | opentelemetry | Recommended | |
k8s.statefulset.uid | string | The UID of the StatefulSet. | 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff | Recommended | |
k8s.statefulset.annotation.<key> | string | The annotation placed on the StatefulSet, the <key> being the annotation name, the value being the annotation value, even if the value is empty. [21] | 1; `` | Opt-In | |
k8s.statefulset.label.<key> | string | The label placed on the StatefulSet, the <key> being the label name, the value being the label value, even if the value is empty. [22] | guestbook; `` | Opt-In |
[21] k8s.statefulset.annotation.<key>: Examples:
- A label
replicaswith value1SHOULD be recorded as thek8s.statefulset.annotation.replicasattribute with value"1". - A label
datawith empty string value SHOULD be recorded as thek8s.statefulset.annotation.dataattribute with value"".
[22] k8s.statefulset.label.<key>: Examples:
- A label
replicaswith value0SHOULD be recorded as thek8s.statefulset.label.appattribute with value"guestbook". - A label
injectedwith empty string value SHOULD be recorded as thek8s.statefulset.label.injectedattribute with value"".
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!