Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .chloggen/fix_k8s_allocatable_updowncounters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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: breaking

# 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: Rename `k8s.node.allocatable.*` metrics to `k8s.node.*.allocatable`

# 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: [2973]

# (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: |
Renamed metrics:
- k8s.node.allocatable.cpu -> k8s.node.cpu.allocatable
- k8s.node.allocatable.memory -> k8s.node.memory.allocatable
- k8s.node.allocatable.ephemeral_storage -> k8s.node.ephemeral_storage.allocatable
8 changes: 4 additions & 4 deletions docs/non-normative/k8s-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ The changes between collector implementation and semantic conventions:

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

<!-- prettier-ignore-end -->

Expand Down
24 changes: 12 additions & 12 deletions docs/system/k8s-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
- [Metric: `k8s.container.status.reason`](#metric-k8scontainerstatusreason)
- [Node metrics](#node-metrics)
- [Metric: `k8s.node.uptime`](#metric-k8snodeuptime)
- [Metric: `k8s.node.allocatable.cpu`](#metric-k8snodeallocatablecpu)
- [Metric: `k8s.node.allocatable.memory`](#metric-k8snodeallocatablememory)
- [Metric: `k8s.node.allocatable.ephemeral_storage`](#metric-k8snodeallocatableephemeral_storage)
- [Metric: `k8s.node.cpu.allocatable`](#metric-k8snodecpuallocatable)
- [Metric: `k8s.node.memory.allocatable`](#metric-k8snodememoryallocatable)
- [Metric: `k8s.node.ephemeral_storage.allocatable`](#metric-k8snodeephemeral_storageallocatable)
- [Metric: `k8s.node.pod.allocatable`](#metric-k8snodepodallocatable)
- [Metric: `k8s.node.condition.status`](#metric-k8snodeconditionstatus)
- [Metric: `k8s.node.cpu.time`](#metric-k8snodecputime)
Expand Down Expand Up @@ -929,11 +929,11 @@ The actual accuracy would depend on the instrumentation and operating system.
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `k8s.node.allocatable.cpu`
### Metric: `k8s.node.cpu.allocatable`

This metric is [recommended][MetricRecommended].

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

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `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) |
| `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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `k8s.node.allocatable.memory`
### Metric: `k8s.node.memory.allocatable`

This metric is [recommended][MetricRecommended].

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

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `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) |
| `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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `k8s.node.allocatable.ephemeral_storage`
### Metric: `k8s.node.ephemeral_storage.allocatable`

This metric is [recommended][MetricRecommended].

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

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `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) |
| `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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
45 changes: 45 additions & 0 deletions model/k8s/deprecated/metrics-deprecated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -465,3 +465,48 @@ groups:
entity_associations:
- k8s.hpa
unit: "{pod}"
- id: metric.k8s.node.allocatable.cpu
type: metric
metric_name: k8s.node.allocatable.cpu
annotations:
code_generation:
metric_value_type: double
stability: development
deprecated:
reason: renamed
renamed_to: k8s.node.cpu.allocatable
brief: "Deprecated, use `k8s.node.cpu.allocatable` instead."
entity_associations:
- k8s.node
instrument: updowncounter
unit: "{cpu}"
- id: metric.k8s.node.allocatable.ephemeral_storage
type: metric
metric_name: k8s.node.allocatable.ephemeral_storage
annotations:
code_generation:
metric_value_type: int
stability: development
deprecated:
reason: renamed
renamed_to: k8s.node.ephemeral_storage.allocatable
brief: "Deprecated, use `k8s.node.ephemeral_storage.allocatable` instead."
entity_associations:
- k8s.node
instrument: updowncounter
unit: "By"
- id: metric.k8s.node.allocatable.memory
type: metric
metric_name: k8s.node.allocatable.memory
annotations:
code_generation:
metric_value_type: int
stability: development
deprecated:
reason: renamed
renamed_to: k8s.node.memory.allocatable
brief: "Deprecated, use `k8s.node.memory.allocatable` instead."
entity_associations:
- k8s.node
instrument: updowncounter
unit: "By"
14 changes: 7 additions & 7 deletions model/k8s/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,10 @@ groups:
unit: "s"
entity_associations:
- k8s.node
# k8s.node.allocatable.* metrics
- id: metric.k8s.node.allocatable.cpu
# k8s.node.*.allocatable metrics
- id: metric.k8s.node.cpu.allocatable
type: metric
metric_name: k8s.node.allocatable.cpu
metric_name: k8s.node.cpu.allocatable
annotations:
code_generation:
metric_value_type: double
Expand All @@ -471,9 +471,9 @@ groups:
- k8s.node
instrument: updowncounter
unit: "{cpu}"
- id: metric.k8s.node.allocatable.ephemeral_storage
- id: metric.k8s.node.ephemeral_storage.allocatable
type: metric
metric_name: k8s.node.allocatable.ephemeral_storage
metric_name: k8s.node.ephemeral_storage.allocatable
annotations:
code_generation:
metric_value_type: int
Expand All @@ -483,9 +483,9 @@ groups:
- k8s.node
instrument: updowncounter
unit: "By"
- id: metric.k8s.node.allocatable.memory
- id: metric.k8s.node.memory.allocatable
type: metric
metric_name: k8s.node.allocatable.memory
metric_name: k8s.node.memory.allocatable
annotations:
code_generation:
metric_value_type: int
Expand Down
Loading