Module: OpenTelemetry::SemConv::K8S
- Defined in:
- lib/opentelemetry/semconv/k8s/attributes.rb
Attribute Names collapse
- K8S_CLUSTER_NAME =
Note:
Stability Level: stable
The name of the cluster.
'k8s.cluster.name'- K8S_CLUSTER_UID =
Note:
Stability Level: stable
A pseudo-ID for the cluster, set to the UID of the
kube-systemnamespace.K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will recommend collecting the
k8s.cluster.uidthrough the official APIs. In the meantime, we are able to use theuidof thekube-systemnamespace 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-systemnamespace is used by Kubernetes itself and will exist for the lifetime of the cluster. Using theuidof thekube-systemnamespace 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.cluster.uid'- K8S_CONTAINER_NAME =
Note:
Stability Level: stable
The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (
container.name). 'k8s.container.name'- K8S_CONTAINER_RESTART_COUNT =
Note:
Stability Level: stable
Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.
'k8s.container.restart_count'- K8S_CRONJOB_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The cronjob annotation placed on the CronJob, the
<key>being the annotation name, the value being the annotation value.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"".
- An annotation
->(key) { "k8s.cronjob.annotation.#{key}" }
- K8S_CRONJOB_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the CronJob, the
<key>being the label name, the value being the label value.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"".
- A label
->(key) { "k8s.cronjob.label.#{key}" }
- K8S_CRONJOB_NAME =
Note:
Stability Level: stable
The name of the CronJob.
'k8s.cronjob.name'- K8S_CRONJOB_UID =
Note:
Stability Level: stable
The UID of the CronJob.
'k8s.cronjob.uid'- K8S_DAEMONSET_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the DaemonSet, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.daemonset.annotation.#{key}" }
- K8S_DAEMONSET_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the DaemonSet, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.daemonset.label.#{key}" }
- K8S_DAEMONSET_NAME =
Note:
Stability Level: stable
The name of the DaemonSet.
'k8s.daemonset.name'- K8S_DAEMONSET_UID =
Note:
Stability Level: stable
The UID of the DaemonSet.
'k8s.daemonset.uid'- K8S_DEPLOYMENT_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the Deployment, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.deployment.annotation.#{key}" }
- K8S_DEPLOYMENT_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the Deployment, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.deployment.label.#{key}" }
- K8S_DEPLOYMENT_NAME =
Note:
Stability Level: stable
The name of the Deployment.
'k8s.deployment.name'- K8S_DEPLOYMENT_UID =
Note:
Stability Level: stable
The UID of the Deployment.
'k8s.deployment.uid'- K8S_JOB_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the Job, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.job.annotation.#{key}" }
- K8S_JOB_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the Job, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.job.label.#{key}" }
- K8S_JOB_NAME =
Note:
Stability Level: stable
The name of the Job.
'k8s.job.name'- K8S_JOB_UID =
Note:
Stability Level: stable
The UID of the Job.
'k8s.job.uid'- K8S_NAMESPACE_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the Namespace, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.namespace.annotation.#{key}" }
- K8S_NAMESPACE_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the Namespace, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.namespace.label.#{key}" }
- K8S_NAMESPACE_NAME =
Note:
Stability Level: stable
The name of the namespace that the pod is running in.
'k8s.namespace.name'- K8S_NODE_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the Node, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- An annotation
->(key) { "k8s.node.annotation.#{key}" }
- K8S_NODE_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the Node, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.node.label.#{key}" }
- K8S_NODE_NAME =
Note:
Stability Level: stable
The name of the Node.
'k8s.node.name'- K8S_NODE_UID =
Note:
Stability Level: stable
The UID of the Node.
'k8s.node.uid'- K8S_POD_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the Pod, the
<key>being the annotation name, the value being the annotation value.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"".
- An annotation
->(key) { "k8s.pod.annotation.#{key}" }
- K8S_POD_HOSTNAME =
Note:
Stability Level: stable
Specifies the hostname of the Pod.
The K8s Pod spec has an optional hostname field, which can be used to specify a hostname. Refer to K8s docs for more information about this field.
This attribute aligns with the
hostnamefield of the K8s PodSpec. 'k8s.pod.hostname'- K8S_POD_IP =
Note:
Stability Level: stable
IP address allocated to the Pod.
This attribute aligns with the
podIPfield of the K8s PodStatus. 'k8s.pod.ip'- K8S_POD_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the Pod, the
<key>being the label name, the value being the label value.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"".
- A label
->(key) { "k8s.pod.label.#{key}" }
- K8S_POD_NAME =
Note:
Stability Level: stable
The name of the Pod.
'k8s.pod.name'- K8S_POD_START_TIME =
Note:
Stability Level: stable
The start timestamp of the Pod.
Date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.
This attribute aligns with the
startTimefield of the K8s PodStatus, in ISO 8601 (RFC 3339 compatible) format. 'k8s.pod.start_time'- K8S_POD_UID =
Note:
Stability Level: stable
The UID of the Pod.
'k8s.pod.uid'- K8S_REPLICASET_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the ReplicaSet, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.replicaset.annotation.#{key}" }
- K8S_REPLICASET_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the ReplicaSet, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.replicaset.label.#{key}" }
- K8S_REPLICASET_NAME =
Note:
Stability Level: stable
The name of the ReplicaSet.
'k8s.replicaset.name'- K8S_REPLICASET_UID =
Note:
Stability Level: stable
The UID of the ReplicaSet.
'k8s.replicaset.uid'- K8S_STATEFULSET_ANNOTATION_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The annotation placed on the StatefulSet, the
<key>being the annotation name, the value being the annotation value, even if the value is empty.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"".
- A label
->(key) { "k8s.statefulset.annotation.#{key}" }
- K8S_STATEFULSET_LABEL_LAMBDA =
Note:
Stability Level: stable
Must be called with a key for the full attribute name. See notes below about the expectations for the state of the key.
The label placed on the StatefulSet, the
<key>being the label name, the value being the label value, even if the value is empty.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"".
- A label
->(key) { "k8s.statefulset.label.#{key}" }
- K8S_STATEFULSET_NAME =
Note:
Stability Level: stable
The name of the StatefulSet.
'k8s.statefulset.name'- K8S_STATEFULSET_UID =
Note:
Stability Level: stable
The UID of the StatefulSet.
'k8s.statefulset.uid'