Skip to content

Commit efea622

Browse files
ChrsMarklmolkova
andauthored
Add k8s.{pod,node}.memory.usage metrics (open-telemetry#1406)
Signed-off-by: ChrsMark <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]>
1 parent beaeab8 commit efea622

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed

.chloggen/add_k8s_memory_usage.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: k8s
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Add k8s.pod.memory usage and k8s.node.memory.usage metrics
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1406]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/system/k8s-metrics.md

+50
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,31 @@ This metric is [recommended][MetricRecommended].
6060

6161

6262

63+
<!-- markdownlint-restore -->
64+
<!-- prettier-ignore-end -->
65+
<!-- END AUTOGENERATED TEXT -->
66+
<!-- endsemconv -->
67+
68+
### Metric: `k8s.pod.memory.usage`
69+
70+
This metric is [recommended][MetricRecommended].
71+
72+
<!-- semconv metric.k8s.pod.memory.usage -->
73+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
74+
<!-- see templates/registry/markdown/snippet.md.j2 -->
75+
<!-- prettier-ignore-start -->
76+
<!-- markdownlint-capture -->
77+
<!-- markdownlint-disable -->
78+
79+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
80+
| -------- | --------------- | ----------- | -------------- | --------- |
81+
| `k8s.pod.memory.usage` | Gauge | `By` | Memory usage of the Pod [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
82+
83+
84+
**[1]:** Total memory usage of the Pod
85+
86+
87+
6388
<!-- markdownlint-restore -->
6489
<!-- prettier-ignore-end -->
6590
<!-- END AUTOGENERATED TEXT -->
@@ -110,6 +135,31 @@ This metric is [recommended][MetricRecommended].
110135

111136

112137

138+
<!-- markdownlint-restore -->
139+
<!-- prettier-ignore-end -->
140+
<!-- END AUTOGENERATED TEXT -->
141+
<!-- endsemconv -->
142+
143+
### Metric: `k8s.node.memory.usage`
144+
145+
This metric is [recommended][MetricRecommended].
146+
147+
<!-- semconv metric.k8s.node.memory.usage -->
148+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
149+
<!-- see templates/registry/markdown/snippet.md.j2 -->
150+
<!-- prettier-ignore-start -->
151+
<!-- markdownlint-capture -->
152+
<!-- markdownlint-disable -->
153+
154+
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
155+
| -------- | --------------- | ----------- | -------------- | --------- |
156+
| `k8s.node.memory.usage` | Gauge | `By` | Memory usage of the Node [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
157+
158+
159+
**[1]:** Total memory usage of the Node
160+
161+
162+
113163
<!-- markdownlint-restore -->
114164
<!-- prettier-ignore-end -->
115165
<!-- END AUTOGENERATED TEXT -->

model/k8s/metrics.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ groups:
1919
instrument: gauge
2020
unit: "{cpu}"
2121

22+
# k8s.pod.memory.* metrics
23+
- id: metric.k8s.pod.memory.usage
24+
type: metric
25+
metric_name: k8s.pod.memory.usage
26+
stability: experimental
27+
brief: "Memory usage of the Pod"
28+
note: >
29+
Total memory usage of the Pod
30+
instrument: gauge
31+
unit: "By"
32+
2233
# k8s.node.cpu.* metrics
2334
- id: metric.k8s.node.cpu.time
2435
type: metric
@@ -38,3 +49,14 @@ groups:
3849
CPU usage of the specific Node on all available CPU cores, averaged over the sample window
3950
instrument: gauge
4051
unit: "{cpu}"
52+
53+
# k8s.node.memory.* metrics
54+
- id: metric.k8s.node.memory.usage
55+
type: metric
56+
metric_name: k8s.node.memory.usage
57+
stability: experimental
58+
brief: "Memory usage of the Node"
59+
note: >
60+
Total memory usage of the Node
61+
instrument: gauge
62+
unit: "By"

0 commit comments

Comments
 (0)