Skip to content

Commit b081a03

Browse files
authored
Rename k8s.node.allocatable.* metrics to k8s.node.*.allocatable (#2973)
Signed-off-by: ChrsMark <[email protected]>
1 parent 6da8f44 commit b081a03

File tree

5 files changed

+94
-23
lines changed

5 files changed

+94
-23
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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: Rename `k8s.node.allocatable.*` metrics to `k8s.node.*.allocatable`
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: [2973]
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.cpu -> k8s.node.cpu.allocatable
25+
- k8s.node.allocatable.memory -> k8s.node.memory.allocatable
26+
- k8s.node.allocatable.ephemeral_storage -> k8s.node.ephemeral_storage.allocatable

docs/non-normative/k8s-migration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ The changes between collector implementation and semantic conventions:
108108

109109
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
110110
|------------------------------------------------------------------------------------|------------------------------------------------------------------|
111-
| `k8s.node.allocatable_cpu` (type: `gauge`) | `k8s.node.allocatable.cpu` (type: `updowncounter`) |
112-
| `k8s.node.allocatable_memory` (type: `gauge`) | `k8s.node.allocatable.memory` (type: `updowncounter`) |
113-
| `k8s.node.allocatable_ephemeral_storage` (type: `gauge`) | `k8s.node.allocatable.ephemeral_storage` (type: `updowncounter`) |
114-
| `k8s.node.allocatable_pods` (type: `gauge`) | `k8s.node.pod.allocatable` (type: `updowncounter`) |
111+
| `k8s.node.allocatable_cpu` (type: `gauge`) | `k8s.node.cpu.allocatable` (type: `updowncounter`) |
112+
| `k8s.node.allocatable_memory` (type: `gauge`) | `k8s.node.memory.allocatable` (type: `updowncounter`) |
113+
| `k8s.node.allocatable_ephemeral_storage` (type: `gauge`) | `k8s.node.ephemeral_storage.allocatable` (type: `updowncounter`) |
114+
| `k8s.node.allocatable_pods` (type: `gauge`) | `k8s.node.pod.allocatable` (type: `updowncounter`) |
115115

116116
<!-- prettier-ignore-end -->
117117

docs/system/k8s-metrics.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
4444
- [Metric: `k8s.container.status.reason`](#metric-k8scontainerstatusreason)
4545
- [Node metrics](#node-metrics)
4646
- [Metric: `k8s.node.uptime`](#metric-k8snodeuptime)
47-
- [Metric: `k8s.node.allocatable.cpu`](#metric-k8snodeallocatablecpu)
48-
- [Metric: `k8s.node.allocatable.memory`](#metric-k8snodeallocatablememory)
49-
- [Metric: `k8s.node.allocatable.ephemeral_storage`](#metric-k8snodeallocatableephemeral_storage)
47+
- [Metric: `k8s.node.cpu.allocatable`](#metric-k8snodecpuallocatable)
48+
- [Metric: `k8s.node.memory.allocatable`](#metric-k8snodememoryallocatable)
49+
- [Metric: `k8s.node.ephemeral_storage.allocatable`](#metric-k8snodeephemeral_storageallocatable)
5050
- [Metric: `k8s.node.pod.allocatable`](#metric-k8snodepodallocatable)
5151
- [Metric: `k8s.node.condition.status`](#metric-k8snodeconditionstatus)
5252
- [Metric: `k8s.node.cpu.time`](#metric-k8snodecputime)
@@ -955,11 +955,11 @@ The actual accuracy would depend on the instrumentation and operating system.
955955
<!-- END AUTOGENERATED TEXT -->
956956
<!-- endsemconv -->
957957

958-
### Metric: `k8s.node.allocatable.cpu`
958+
### Metric: `k8s.node.cpu.allocatable`
959959

960960
This metric is [recommended][MetricRecommended].
961961

962-
<!-- semconv metric.k8s.node.allocatable.cpu -->
962+
<!-- semconv metric.k8s.node.cpu.allocatable -->
963963
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
964964
<!-- see templates/registry/markdown/snippet.md.j2 -->
965965
<!-- prettier-ignore-start -->
@@ -968,18 +968,18 @@ This metric is [recommended][MetricRecommended].
968968

969969
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
970970
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
971-
| `k8s.node.allocatable.cpu` | UpDownCounter | `{cpu}` | Amount of cpu allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
971+
| `k8s.node.cpu.allocatable` | UpDownCounter | `{cpu}` | Amount of cpu allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
972972

973973
<!-- markdownlint-restore -->
974974
<!-- prettier-ignore-end -->
975975
<!-- END AUTOGENERATED TEXT -->
976976
<!-- endsemconv -->
977977

978-
### Metric: `k8s.node.allocatable.memory`
978+
### Metric: `k8s.node.memory.allocatable`
979979

980980
This metric is [recommended][MetricRecommended].
981981

982-
<!-- semconv metric.k8s.node.allocatable.memory -->
982+
<!-- semconv metric.k8s.node.memory.allocatable -->
983983
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
984984
<!-- see templates/registry/markdown/snippet.md.j2 -->
985985
<!-- prettier-ignore-start -->
@@ -988,18 +988,18 @@ This metric is [recommended][MetricRecommended].
988988

989989
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
990990
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
991-
| `k8s.node.allocatable.memory` | UpDownCounter | `By` | Amount of memory allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
991+
| `k8s.node.memory.allocatable` | UpDownCounter | `By` | Amount of memory allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
992992

993993
<!-- markdownlint-restore -->
994994
<!-- prettier-ignore-end -->
995995
<!-- END AUTOGENERATED TEXT -->
996996
<!-- endsemconv -->
997997

998-
### Metric: `k8s.node.allocatable.ephemeral_storage`
998+
### Metric: `k8s.node.ephemeral_storage.allocatable`
999999

10001000
This metric is [recommended][MetricRecommended].
10011001

1002-
<!-- semconv metric.k8s.node.allocatable.ephemeral_storage -->
1002+
<!-- semconv metric.k8s.node.ephemeral_storage.allocatable -->
10031003
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
10041004
<!-- see templates/registry/markdown/snippet.md.j2 -->
10051005
<!-- prettier-ignore-start -->
@@ -1008,7 +1008,7 @@ This metric is [recommended][MetricRecommended].
10081008

10091009
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
10101010
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
1011-
| `k8s.node.allocatable.ephemeral_storage` | UpDownCounter | `By` | Amount of ephemeral-storage allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
1011+
| `k8s.node.ephemeral_storage.allocatable` | UpDownCounter | `By` | Amount of ephemeral-storage allocatable on the node. | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) |
10121012

10131013
<!-- markdownlint-restore -->
10141014
<!-- prettier-ignore-end -->

model/k8s/deprecated/metrics-deprecated.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,3 +465,48 @@ groups:
465465
entity_associations:
466466
- k8s.hpa
467467
unit: "{pod}"
468+
- id: metric.k8s.node.allocatable.cpu
469+
type: metric
470+
metric_name: k8s.node.allocatable.cpu
471+
annotations:
472+
code_generation:
473+
metric_value_type: double
474+
stability: development
475+
deprecated:
476+
reason: renamed
477+
renamed_to: k8s.node.cpu.allocatable
478+
brief: "Deprecated, use `k8s.node.cpu.allocatable` instead."
479+
entity_associations:
480+
- k8s.node
481+
instrument: updowncounter
482+
unit: "{cpu}"
483+
- id: metric.k8s.node.allocatable.ephemeral_storage
484+
type: metric
485+
metric_name: k8s.node.allocatable.ephemeral_storage
486+
annotations:
487+
code_generation:
488+
metric_value_type: int
489+
stability: development
490+
deprecated:
491+
reason: renamed
492+
renamed_to: k8s.node.ephemeral_storage.allocatable
493+
brief: "Deprecated, use `k8s.node.ephemeral_storage.allocatable` instead."
494+
entity_associations:
495+
- k8s.node
496+
instrument: updowncounter
497+
unit: "By"
498+
- id: metric.k8s.node.allocatable.memory
499+
type: metric
500+
metric_name: k8s.node.allocatable.memory
501+
annotations:
502+
code_generation:
503+
metric_value_type: int
504+
stability: development
505+
deprecated:
506+
reason: renamed
507+
renamed_to: k8s.node.memory.allocatable
508+
brief: "Deprecated, use `k8s.node.memory.allocatable` instead."
509+
entity_associations:
510+
- k8s.node
511+
instrument: updowncounter
512+
unit: "By"

model/k8s/metrics.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,10 @@ groups:
458458
unit: "s"
459459
entity_associations:
460460
- k8s.node
461-
# k8s.node.allocatable.* metrics
462-
- id: metric.k8s.node.allocatable.cpu
461+
# k8s.node.*.allocatable metrics
462+
- id: metric.k8s.node.cpu.allocatable
463463
type: metric
464-
metric_name: k8s.node.allocatable.cpu
464+
metric_name: k8s.node.cpu.allocatable
465465
annotations:
466466
code_generation:
467467
metric_value_type: double
@@ -471,9 +471,9 @@ groups:
471471
- k8s.node
472472
instrument: updowncounter
473473
unit: "{cpu}"
474-
- id: metric.k8s.node.allocatable.ephemeral_storage
474+
- id: metric.k8s.node.ephemeral_storage.allocatable
475475
type: metric
476-
metric_name: k8s.node.allocatable.ephemeral_storage
476+
metric_name: k8s.node.ephemeral_storage.allocatable
477477
annotations:
478478
code_generation:
479479
metric_value_type: int
@@ -483,9 +483,9 @@ groups:
483483
- k8s.node
484484
instrument: updowncounter
485485
unit: "By"
486-
- id: metric.k8s.node.allocatable.memory
486+
- id: metric.k8s.node.memory.allocatable
487487
type: metric
488-
metric_name: k8s.node.allocatable.memory
488+
metric_name: k8s.node.memory.allocatable
489489
annotations:
490490
code_generation:
491491
metric_value_type: int

0 commit comments

Comments
 (0)