Skip to content

Commit 6b81fd4

Browse files
committed
[k8s] Fix updowncounters to follow the non-pluralization rule
Signed-off-by: ChrsMark <[email protected]>
1 parent 7e3f8bd commit 6b81fd4

File tree

5 files changed

+650
-188
lines changed

5 files changed

+650
-188
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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: breaking
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: "Fix plural-named updowncounter k8s metrics; replace with singular + .count names."
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: [2301]
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: |
23+
Renamed metrics:
24+
- k8s.node.allocatable.pods -> k8s.node.allocatable.pod.count
25+
- k8s.daemonset.current_scheduled_nodes -> k8s.daemonset.current_scheduled_node.count
26+
- k8s.daemonset.desired_scheduled_nodes -> k8s.daemonset.desired_scheduled_node.count
27+
- k8s.daemonset.misscheduled_nodes -> k8s.daemonset.misscheduled_node.count
28+
- k8s.daemonset.ready_nodes -> k8s.daemonset.ready_node.count
29+
- k8s.job.active_pods -> k8s.job.active_pod.count
30+
- k8s.job.failed_pods -> k8s.job.failed_pod.count
31+
- k8s.job.successful_pods -> k8s.job.successful_pod.count
32+
- k8s.job.desired_successful_pods -> k8s.job.desired_successful_pod.count
33+
- k8s.job.max_parallel_pods -> k8s.job.max_parallel_pod.count
34+
- k8s.cronjob.active_jobs -> k8s.cronjob.active_job.count
35+
- k8s.deployment.desired_pods -> k8s.deployment.desired_pod.count
36+
- k8s.deployment.available_pods -> k8s.deployment.available_pod.count
37+
- k8s.replicaset.desired_pods -> k8s.replicaset.desired_pod.count
38+
- k8s.replicaset.available_pods -> k8s.replicaset.available_pod.count
39+
- k8s.replicationcontroller.desired_pods -> k8s.replicationcontroller.desired_pod.count
40+
- k8s.replicationcontroller.available_pods -> k8s.replicationcontroller.available_pod.count
41+
- k8s.statefulset.desired_pods -> k8s.statefulset.desired_pod.count
42+
- k8s.statefulset.ready_pods -> k8s.statefulset.ready_pod.count
43+
- k8s.statefulset.current_pods -> k8s.statefulset.current_pod.count
44+
- k8s.statefulset.updated_pods -> k8s.statefulset.updated_pod.count
45+
- k8s.hpa.desired_pods -> k8s.hpa.desired_pod.count
46+
- k8s.hpa.current_pods -> k8s.hpa.current_pod.count
47+
- k8s.hpa.max_pods -> k8s.hpa.max_pod.count
48+
- k8s.hpa.min_pods -> k8s.hpa.min_pod.count

docs/non-normative/k8s-migration.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The changes between collector implementation and semantic conventions:
107107
| `k8s.node.allocatable_cpu` (type: `gauge`) | `k8s.node.allocatable.cpu` (type: `updowncounter`) |
108108
| `k8s.node.allocatable_memory` (type: `gauge`) | `k8s.node.allocatable.memory` (type: `updowncounter`) |
109109
| `k8s.node.allocatable_ephemeral_storage` (type: `gauge`) | `k8s.node.allocatable.ephemeral_storage` (type: `updowncounter`) |
110-
| `k8s.node.allocatable_pods` (type: `gauge`) | `k8s.node.allocatable.pods` (type: `updowncounter`) |
110+
| `k8s.node.allocatable_pods` (type: `gauge`) | `k8s.node.allocatablepod.count` (type: `updowncounter`) |
111111

112112
<!-- prettier-ignore-end -->
113113

@@ -124,8 +124,8 @@ The changes in their metric names and types are the following:
124124

125125
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
126126
|------------------------------------------------------------------------------------|--------------------------------------------------------------|
127-
| `k8s.deployment.desired` (type: `gauge`) | `k8s.deployment.desired_pods` (type: `updowncounter`) |
128-
| `k8s.deployment.available` (type: `gauge`) | `k8s.deployment.available_pods` (type: `updowncounter`) |
127+
| `k8s.deployment.desired` (type: `gauge`) | `k8s.deployment.desired_pod.count` (type: `updowncounter`) |
128+
| `k8s.deployment.available` (type: `gauge`) | `k8s.deployment.available_pod.count` (type: `updowncounter`) |
129129

130130
<!-- prettier-ignore-end -->
131131

@@ -142,8 +142,8 @@ The changes in their metric names and types are the following:
142142

143143
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
144144
|------------------------------------------------------------------------------------|---------------------------------------------------------|
145-
| `k8s.replicaset.desired` (type: `gauge`) | `k8s.replicaset.desired_pods` (type: `updowncounter`) |
146-
| `k8s.replicaset.available` (type: `gauge`) | `k8s.replicaset.available_pods` (type: `updowncounter`) |
145+
| `k8s.replicaset.desired` (type: `gauge`) | `k8s.replicaset.desired_pod.count` (type: `updowncounter`) |
146+
| `k8s.replicaset.available` (type: `gauge`) | `k8s.replicaset.available_pod.count` (type: `updowncounter`) |
147147

148148
<!-- prettier-ignore-end -->
149149

@@ -160,8 +160,8 @@ The changes in their metric names and types are the following:
160160

161161
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
162162
|------------------------------------------------------------------------------------|--------------------------------------------------------------------|
163-
| `k8s.replication_controller.desired` (type: `gauge`) | `k8s.replicationcontroller.desired_pods` (type: `updowncounter`) |
164-
| `k8s.replication_controller.available` (type: `gauge`) | `k8s.replicationcontroller.available_pods` (type: `updowncounter`) |
163+
| `k8s.replication_controller.desired` (type: `gauge`) | `k8s.replicationcontroller.desired_pod.count` (type: `updowncounter`) |
164+
| `k8s.replication_controller.available` (type: `gauge`) | `k8s.replicationcontroller.available_pod.count` (type: `updowncounter`) |
165165

166166
<!-- prettier-ignore-end -->
167167

@@ -176,12 +176,12 @@ The changes in their metric types are the following:
176176

177177
<!-- prettier-ignore-start -->
178178

179-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
180-
|------------------------------------------------------------------------------------|----------------------------------------------------------|
181-
| `k8s.statefulset.desired_pods` (type: `gauge`) | `k8s.statefulset.desired_pods` (type: `updowncounter`) |
182-
| `k8s.statefulset.ready_pods` (type: `gauge`) | `k8s.statefulset.ready_pods` (type: `updowncounter`) |
183-
| `k8s.statefulset.current_pods` (type: `gauge`) | `k8s.statefulset.current_pods` (type: `updowncounter`) |
184-
| `k8s.statefulset.updated_pods` (type: `gauge`) | `k8s.statefulset.updated_pods` (type: `updowncounter`) |
179+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
180+
|------------------------------------------------------------------------------------|---------------------------------------------------------------|
181+
| `k8s.statefulset.desired_pods` (type: `gauge`) | `k8s.statefulset.desired_pod.count` (type: `updowncounter`) |
182+
| `k8s.statefulset.ready_pods` (type: `gauge`) | `k8s.statefulset.ready_pod.count` (type: `updowncounter`) |
183+
| `k8s.statefulset.current_pods` (type: `gauge`) | `k8s.statefulset.current_pod.count` (type: `updowncounter`) |
184+
| `k8s.statefulset.updated_pods` (type: `gauge`) | `k8s.statefulset.updated_pod.count` (type: `updowncounter`) |
185185

186186
<!-- prettier-ignore-end -->
187187

@@ -196,12 +196,12 @@ The changes in their metric names and types are the following:
196196

197197
<!-- prettier-ignore-start -->
198198

199-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
200-
|------------------------------------------------------------------------------------|------------------------------------------------|
201-
| `k8s.hpa.desired_replicas` (type: `gauge`) | `k8s.hpa.desired_pods` (type: `updowncounter`) |
202-
| `k8s.hpa.current_replicas` (type: `gauge`) | `k8s.hpa.current_pods` (type: `updowncounter`) |
203-
| `k8s.hpa.max_replicas` (type: `gauge`) | `k8s.hpa.max_pods` (type: `updowncounter`) |
204-
| `k8s.hpa.min_replicas` (type: `gauge`) | `k8s.hpa.min_pods` (type: `updowncounter`) |
199+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
200+
|------------------------------------------------------------------------------------|-----------------------------------------------------|
201+
| `k8s.hpa.desired_replicas` (type: `gauge`) | `k8s.hpa.desired_pod.count` (type: `updowncounter`) |
202+
| `k8s.hpa.current_replicas` (type: `gauge`) | `k8s.hpa.current_pod.count` (type: `updowncounter`) |
203+
| `k8s.hpa.max_replicas` (type: `gauge`) | `k8s.hpa.max_pod.count` (type: `updowncounter`) |
204+
| `k8s.hpa.min_replicas` (type: `gauge`) | `k8s.hpa.min_pod.count` (type: `updowncounter`) |
205205

206206
<!-- prettier-ignore-end -->
207207

@@ -216,12 +216,12 @@ The changes in their metric types are the following:
216216

217217
<!-- prettier-ignore-start -->
218218

219-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
220-
|------------------------------------------------------------------------------------|-----------------------------------------------------------------|
221-
| `k8s.daemonset.current_scheduled_nodes` (type: `gauge`) | `k8s.daemonset.current_scheduled_nodes` (type: `updowncounter`) |
222-
| `k8s.daemonset.desired_scheduled_nodes` (type: `gauge`) | `k8s.daemonset.desired_scheduled_nodes` (type: `updowncounter`) |
223-
| `k8s.daemonset.misscheduled_nodes` (type: `gauge`) | `k8s.daemonset.misscheduled_nodes` (type: `updowncounter`) |
224-
| `k8s.daemonset.ready_nodes` (type: `gauge`) | `k8s.daemonset.ready_nodes` (type: `updowncounter`) |
219+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
220+
|------------------------------------------------------------------------------------|----------------------------------------------------------------------|
221+
| `k8s.daemonset.current_scheduled_nodes` (type: `gauge`) | `k8s.daemonset.current_scheduled_node.count` (type: `updowncounter`) |
222+
| `k8s.daemonset.desired_scheduled_nodes` (type: `gauge`) | `k8s.daemonset.desired_scheduled_node.count` (type: `updowncounter`) |
223+
| `k8s.daemonset.misscheduled_nodes` (type: `gauge`) | `k8s.daemonset.misscheduled_node.count` (type: `updowncounter`) |
224+
| `k8s.daemonset.ready_nodes` (type: `gauge`) | `k8s.daemonset.ready_node.count` (type: `updowncounter`) |
225225

226226
<!-- prettier-ignore-end -->
227227

@@ -236,12 +236,12 @@ The changes in their metric types are the following:
236236

237237
<!-- prettier-ignore-start -->
238238

239-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
240-
|----------------------------------------------------------|----------------------------------------|
241-
| `k8s.job.active_pods` (type: `gauge`) | `k8s.job.active_pods` (type: `updowncounter`) |
242-
| `k8s.job.failed_pods` (type: `gauge`) | `k8s.job.failed_pods` (type: `updowncounter`) |
243-
| `k8s.job.desired_successful_pods` (type: `gauge`) | `k8s.job.desired_successful_pods` (type: `updowncounter`) |
244-
| `k8s.job.max_parallel_pods` (type: `gauge`) | `k8s.job.max_parallel_pods` (type: `updowncounter`) |
239+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
240+
|----------------------------------------------------------|-----------------------------------------------------------------|
241+
| `k8s.job.active_pods` (type: `gauge`) | `k8s.job.active_pod.count` (type: `updowncounter`) |
242+
| `k8s.job.failed_pods` (type: `gauge`) | `k8s.job.failed_pod.count` (type: `updowncounter`) |
243+
| `k8s.job.desired_successful_pods` (type: `gauge`) | `k8s.job.desired_successful_pod.count` (type: `updowncounter`) |
244+
| `k8s.job.max_parallel_pods` (type: `gauge`) | `k8s.job.max_parallel_pod.count` (type: `updowncounter`) |
245245

246246
### K8s Cronjob metrics
247247

@@ -254,9 +254,9 @@ The changes in their metric types are the following:
254254

255255
<!-- prettier-ignore-start -->
256256

257-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
258-
|--------------------------------------------------|--------------------------------|
259-
| `k8s.cronjob.active_jobs` (type: `gauge`) | `k8s.cronjob.active_jobs` (type: `updowncounter`) |
257+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
258+
|--------------------------------------------------|--------------------------------------------------------|
259+
| `k8s.cronjob.active_jobs` (type: `gauge`) | `k8s.cronjob.active_job.count` (type: `updowncounter`) |
260260

261261
<!-- prettier-ignore-end -->
262262

0 commit comments

Comments
 (0)