diff --git a/.chloggen/add_k8s_memory_usage.yaml b/.chloggen/add_k8s_memory_usage.yaml new file mode 100755 index 0000000000..a57b9d7f42 --- /dev/null +++ b/.chloggen/add_k8s_memory_usage.yaml @@ -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 k8s.pod.memory usage and k8s.node.memory.usage metrics + +# 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: [1406] + +# (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: diff --git a/docs/system/k8s-metrics.md b/docs/system/k8s-metrics.md index d5b6f0f839..42d152c65e 100644 --- a/docs/system/k8s-metrics.md +++ b/docs/system/k8s-metrics.md @@ -60,6 +60,31 @@ This metric is [recommended][MetricRecommended]. + + + + + +### Metric: `k8s.pod.memory.usage` + +This metric is [recommended][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `k8s.pod.memory.usage` | Gauge | `By` | Memory usage of the Pod [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + +**[1]:** Total memory usage of the Pod + + + @@ -110,6 +135,31 @@ This metric is [recommended][MetricRecommended]. + + + + + +### Metric: `k8s.node.memory.usage` + +This metric is [recommended][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `k8s.node.memory.usage` | Gauge | `By` | Memory usage of the Node [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + +**[1]:** Total memory usage of the Node + + + diff --git a/model/k8s/metrics.yaml b/model/k8s/metrics.yaml index b11a6f68d4..a09cfee780 100644 --- a/model/k8s/metrics.yaml +++ b/model/k8s/metrics.yaml @@ -19,6 +19,17 @@ groups: instrument: gauge unit: "{cpu}" + # k8s.pod.memory.* metrics + - id: metric.k8s.pod.memory.usage + type: metric + metric_name: k8s.pod.memory.usage + stability: experimental + brief: "Memory usage of the Pod" + note: > + Total memory usage of the Pod + instrument: gauge + unit: "By" + # k8s.node.cpu.* metrics - id: metric.k8s.node.cpu.time type: metric @@ -38,3 +49,14 @@ groups: CPU usage of the specific Node on all available CPU cores, averaged over the sample window instrument: gauge unit: "{cpu}" + + # k8s.node.memory.* metrics + - id: metric.k8s.node.memory.usage + type: metric + metric_name: k8s.node.memory.usage + stability: experimental + brief: "Memory usage of the Node" + note: > + Total memory usage of the Node + instrument: gauge + unit: "By"