You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/registry/attributes/k8s.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,8 @@ Kubernetes resource attributes.
55
55
| <aid="k8s-pod-annotation"href="#k8s-pod-annotation">`k8s.pod.annotation.<key>`</a> | string | The annotation placed on the Pod, the `<key>` being the annotation name, the value being the annotation value. [21]|`true`; `x64`; `` ||
56
56
| <aid="k8s-pod-label"href="#k8s-pod-label">`k8s.pod.label.<key>`</a> | string | The label placed on the Pod, the `<key>` being the label name, the value being the label value. [22]|`my-app`; `x64`; `` ||
57
57
| <aid="k8s-pod-name"href="#k8s-pod-name">`k8s.pod.name`</a> | string | The name of the Pod. |`opentelemetry-pod-autoconf`||
58
+
| <aid="k8s-pod-status-phase"href="#k8s-pod-status-phase">`k8s.pod.status.phase`</a> | string | The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core)|`Pending`; `Running`||
59
+
| <aid="k8s-pod-status-reason"href="#k8s-pod-status-reason">`k8s.pod.status.reason`</a> | string | The reason for the pod state. Corresponds to the `reason` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core)|`Evicted`; `NodeAffinity`||
58
60
| <aid="k8s-pod-uid"href="#k8s-pod-uid">`k8s.pod.uid`</a> | string | The UID of the Pod. |`275ecb36-5aa8-4c2a-9c47-d8bb681b9aff`||
59
61
| <aid="k8s-replicaset-annotation"href="#k8s-replicaset-annotation">`k8s.replicaset.annotation.<key>`</a> | 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. [23]|`0`; `` ||
60
62
| <aid="k8s-replicaset-label"href="#k8s-replicaset-label">`k8s.replicaset.label.<key>`</a> | 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. [24]|`guestbook`; `` ||
@@ -311,6 +313,30 @@ When this occurs, the exact value as reported by the Kubernetes API SHOULD be us
311
313
312
314
---
313
315
316
+
`k8s.pod.status.phase` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
317
+
318
+
| Value | Description | Stability |
319
+
|---|---|---|
320
+
|`Failed`| All containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system). ||
321
+
|`Pending`| The pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host. ||
322
+
|`Running`| The pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted. ||
323
+
|`Succeeded`| All containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers. ||
324
+
|`Unknown`| For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. ||
325
+
326
+
---
327
+
328
+
`k8s.pod.status.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
329
+
330
+
| Value | Description | Stability |
331
+
|---|---|---|
332
+
|`Evicted`| The pod is evicted. ||
333
+
|`NodeAffinity`| The pod is in a status because of its node affinity ||
334
+
|`NodeLost`| The reason on a pod when its state cannot be confirmed as kubelet is unresponsive on the node it is (was) running. ||
335
+
|`Shutdown`| The node is shutdown ||
336
+
|`UnexpectedAdmissionError`| The pod was rejected admission to the node because of an error during admission that could not be categorized. ||
337
+
338
+
---
339
+
314
340
`k8s.volume.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|`k8s.pod.status.phase`| UpDownCounter |`{pod}`| Describes number of K8s Pods that are currently in a given phase. [1]||[`k8s.pod`](/docs/registry/entities/k8s.md#k8s-pod)|
171
+
172
+
**[1]:** All possible pod phases will be reported at each time interval to avoid missing metrics.
173
+
Only the value corresponding to the current phase will be non-zero.
|[`k8s.pod.status.phase`](/docs/registry/attributes/k8s.md)| string | The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core)|`Pending`; `Running`|`Required`||
178
+
179
+
---
180
+
181
+
`k8s.pod.status.phase` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
182
+
183
+
| Value | Description | Stability |
184
+
|---|---|---|
185
+
|`Failed`| All containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system). ||
186
+
|`Pending`| The pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host. ||
187
+
|`Running`| The pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted. ||
188
+
|`Succeeded`| All containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers. ||
189
+
|`Unknown`| For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. ||
190
+
191
+
<!-- markdownlint-restore -->
192
+
<!-- prettier-ignore-end -->
193
+
<!-- END AUTOGENERATED TEXT -->
194
+
<!-- endsemconv -->
195
+
196
+
### Metric: `k8s.pod.status.reason`
197
+
198
+
This metric is [recommended][MetricRecommended].
199
+
200
+
<!-- semconv metric.k8s.pod.status.reason -->
201
+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
202
+
<!-- see templates/registry/markdown/snippet.md.j2 -->
203
+
<!-- prettier-ignore-start -->
204
+
<!-- markdownlint-capture -->
205
+
<!-- markdownlint-disable -->
206
+
207
+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|`k8s.pod.status.reason`| UpDownCounter |`{pod}`| Describes the number of K8s Pods that are currently in a state for a given reason. [1]||[`k8s.pod`](/docs/registry/entities/k8s.md#k8s-pod)|
210
+
211
+
**[1]:** All possible pod status reasons will be reported at each time interval to avoid missing metrics.
212
+
Only the value corresponding to the current reason will be non-zero.
|[`k8s.pod.status.reason`](/docs/registry/attributes/k8s.md)| string | The reason for the pod state. Corresponds to the `reason` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core)|`Evicted`; `NodeAffinity`|`Required`||
217
+
218
+
---
219
+
220
+
`k8s.pod.status.reason` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
221
+
222
+
| Value | Description | Stability |
223
+
|---|---|---|
224
+
|`Evicted`| The pod is evicted. ||
225
+
|`NodeAffinity`| The pod is in a status because of its node affinity ||
226
+
|`NodeLost`| The reason on a pod when its state cannot be confirmed as kubelet is unresponsive on the node it is (was) running. ||
227
+
|`Shutdown`| The node is shutdown ||
228
+
|`UnexpectedAdmissionError`| The pod was rejected admission to the node because of an error during admission that could not be categorized. ||
0 commit comments