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
22 changes: 22 additions & 0 deletions .chloggen/add-k8s-allocatable-metrics.yaml
Original file line number Diff line number Diff line change
@@ -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.node.allocatable.cpu`, `k8s.node.allocatable.ephemeral_storage`, `k8s.node.allocatable.memory`, `k8s.node.allocatable.pods` 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: [2243]

# (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:
20 changes: 20 additions & 0 deletions docs/non-normative/k8s-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and one for disabling the old schema called `semconv.k8s.disableLegacy`. Then:

- [Summary of changes](#summary-of-changes)
- [K8s network metrics](#k8s-network-metrics)
- [K8s Node allocatable metrics](#k8s-node-allocatable-metrics)
- [K8s Deployment metrics](#k8s-deployment-metrics)
- [K8s ReplicaSet metrics](#k8s-replicaset-metrics)
- [K8s ReplicationController metrics](#k8s-replicationcontroller-metrics)
Expand Down Expand Up @@ -85,6 +86,25 @@ The changes in their attributes are the following:

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

### K8s Node allocatable metrics

The K8s node allocatable metrics implemented by the Collector and specifically the
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.127.0/receiver/k8sclusterreceiver/documentation.md)
receiver.

The changes between collector implementation and semantic conventions:

<!-- prettier-ignore-start -->

| 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.allocatable.pods` (type: `updowncounter`) |

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

### K8s Deployment metrics

The K8s Deployment metrics implemented by the Collector and specifically the
Expand Down
84 changes: 84 additions & 0 deletions docs/system/k8s-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ 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.allocatable.pods`](#metric-k8snodeallocatablepods)
- [Metric: `k8s.node.cpu.time`](#metric-k8snodecputime)
- [Metric: `k8s.node.cpu.usage`](#metric-k8snodecpuusage)
- [Metric: `k8s.node.memory.usage`](#metric-k8snodememoryusage)
Expand Down Expand Up @@ -354,6 +358,86 @@ The actual accuracy would depend on the instrumentation and operating system.
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

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

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.node.allocatable.cpu -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| 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` |

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

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

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.node.allocatable.memory -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| 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` |

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

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

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.node.allocatable.ephemeral_storage -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| 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` |

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

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

This metric is [recommended][MetricRecommended].

<!-- semconv metric.k8s.node.allocatable.pods -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `k8s.node.allocatable.pods` | UpDownCounter | `{pod}` | Amount of pods allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | `k8s.node` |

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

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

This metric is [recommended][MetricRecommended].
Expand Down
36 changes: 36 additions & 0 deletions model/k8s/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@ groups:
The actual accuracy would depend on the instrumentation and operating system.
instrument: gauge
unit: "s"
- id: metric.k8s.node.allocatable.cpu
type: metric
metric_name: k8s.node.allocatable.cpu
stability: development
brief: "Amount of cpu allocatable on the node"
entity_associations:
- k8s.node
instrument: updowncounter
unit: "{cpu}"
- id: metric.k8s.node.allocatable.ephemeral_storage
type: metric
metric_name: k8s.node.allocatable.ephemeral_storage
stability: development
brief: "Amount of ephemeral-storage allocatable on the node"
entity_associations:
- k8s.node
instrument: updowncounter
unit: "By"
- id: metric.k8s.node.allocatable.memory
type: metric
metric_name: k8s.node.allocatable.memory
stability: development
brief: "Amount of memory allocatable on the node"
entity_associations:
- k8s.node
instrument: updowncounter
unit: "By"
- id: metric.k8s.node.allocatable.pods
type: metric
metric_name: k8s.node.allocatable.pods
stability: development
brief: "Amount of pods allocatable on the node"
entity_associations:
- k8s.node
instrument: updowncounter
unit: "{pod}"
# k8s.node.cpu.* metrics
- id: metric.k8s.node.cpu.time
type: metric
Expand Down
Loading