Add uptime metrics for container, k8s Pod and k8s Node (#1617)
Signed-off-by: ChrsMark <chrismarkou92@gmail.com> Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
This commit is contained in:
parent
3357f69377
commit
68629b9f7e
|
|
@ -0,0 +1,22 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
#
|
||||
# If your change doesn't affect end users you should instead start
|
||||
# your pull request title with [chore] or use the "Skip Changelog" label.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: enhancement
|
||||
|
||||
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
|
||||
component: k8s
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Add uptime metrics for container, K8s Pod and K8s Node
|
||||
|
||||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
|
||||
# The values here must be integers.
|
||||
issues: [1486]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
|
@ -12,6 +12,29 @@ This document describes instruments and attributes for common container level
|
|||
metrics in OpenTelemetry. These metrics are collected from technology-specific,
|
||||
well-defined APIs (e.g. Kubelet's API or container runtimes).
|
||||
|
||||
### Metric: `container.uptime`
|
||||
|
||||
This metric is [recommended][MetricRecommended].
|
||||
|
||||
<!-- semconv metric.container.uptime -->
|
||||
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
||||
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
||||
| -------- | --------------- | ----------- | -------------- | --------- |
|
||||
| `container.uptime` | Gauge | `s` | The time the container has been running [1] |  |
|
||||
|
||||
**[1]:** Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- END AUTOGENERATED TEXT -->
|
||||
<!-- endsemconv -->
|
||||
|
||||
### Metric: `container.cpu.time`
|
||||
|
||||
This metric is [opt-in][MetricOptIn].
|
||||
|
|
@ -198,3 +221,4 @@ This metric is [opt-in][MetricOptIn].
|
|||
|
||||
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
|
||||
[MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in
|
||||
[MetricRecommended]: /docs/general/metric-requirement-level.md#recommended
|
||||
|
|
|
|||
|
|
@ -15,6 +15,29 @@ well-defined APIs (e.g. Kubelet's API).
|
|||
Metrics in `k8s.` instruments SHOULD be attached to a [K8s Resource](/docs/resource/k8s.md)
|
||||
and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
|
||||
|
||||
### Metric: `k8s.pod.uptime`
|
||||
|
||||
This metric is [recommended][MetricRecommended].
|
||||
|
||||
<!-- semconv metric.k8s.pod.uptime -->
|
||||
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
||||
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
||||
| -------- | --------------- | ----------- | -------------- | --------- |
|
||||
| `k8s.pod.uptime` | Gauge | `s` | The time the Pod has been running [1] |  |
|
||||
|
||||
**[1]:** Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- END AUTOGENERATED TEXT -->
|
||||
<!-- endsemconv -->
|
||||
|
||||
### Metric: `k8s.pod.cpu.time`
|
||||
|
||||
This metric is [recommended][MetricRecommended].
|
||||
|
|
@ -149,6 +172,29 @@ This metric is [recommended][MetricRecommended].
|
|||
<!-- END AUTOGENERATED TEXT -->
|
||||
<!-- endsemconv -->
|
||||
|
||||
### Metric: `k8s.node.uptime`
|
||||
|
||||
This metric is [recommended][MetricRecommended].
|
||||
|
||||
<!-- semconv metric.k8s.node.uptime -->
|
||||
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
||||
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
||||
| -------- | --------------- | ----------- | -------------- | --------- |
|
||||
| `k8s.node.uptime` | Gauge | `s` | The time the Node has been running [1] |  |
|
||||
|
||||
**[1]:** Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- END AUTOGENERATED TEXT -->
|
||||
<!-- endsemconv -->
|
||||
|
||||
### Metric: `k8s.node.cpu.time`
|
||||
|
||||
This metric is [recommended][MetricRecommended].
|
||||
|
|
|
|||
|
|
@ -1,4 +1,15 @@
|
|||
groups:
|
||||
# container.* metrics
|
||||
- id: metric.container.uptime
|
||||
type: metric
|
||||
metric_name: container.uptime
|
||||
stability: experimental
|
||||
brief: "The time the container has been running"
|
||||
note: |
|
||||
Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
instrument: gauge
|
||||
unit: "s"
|
||||
# container.cpu.* metrics and attribute group
|
||||
- id: metric.container.cpu.time
|
||||
type: metric
|
||||
|
|
|
|||
|
|
@ -1,4 +1,15 @@
|
|||
groups:
|
||||
# k8s.pod.* metrics
|
||||
- id: metric.k8s.pod.uptime
|
||||
type: metric
|
||||
metric_name: k8s.pod.uptime
|
||||
stability: experimental
|
||||
brief: "The time the Pod has been running"
|
||||
note: |
|
||||
Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
instrument: gauge
|
||||
unit: "s"
|
||||
# k8s.pod.cpu.* metrics
|
||||
- id: metric.k8s.pod.cpu.time
|
||||
type: metric
|
||||
|
|
@ -52,6 +63,17 @@ groups:
|
|||
- ref: network.interface.name
|
||||
- ref: network.io.direction
|
||||
|
||||
# k8s.node.* metrics
|
||||
- id: metric.k8s.node.uptime
|
||||
type: metric
|
||||
metric_name: k8s.node.uptime
|
||||
stability: experimental
|
||||
brief: "The time the Node has been running"
|
||||
note: |
|
||||
Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available.
|
||||
The actual accuracy would depend on the instrumentation and operating system.
|
||||
instrument: gauge
|
||||
unit: "s"
|
||||
# k8s.node.cpu.* metrics
|
||||
- id: metric.k8s.node.cpu.time
|
||||
type: metric
|
||||
|
|
|
|||
Loading…
Reference in New Issue