Skip to content

Commit b60cdba

Browse files
Add metrics for deployment, replicaset, replication_controller, statefulset and hpa (#1636)
Signed-off-by: ChrsMark <[email protected]> Co-authored-by: Tetiana Kravchenko <[email protected]>
1 parent 3be2bcb commit b60cdba

File tree

4 files changed

+731
-5
lines changed

4 files changed

+731
-5
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 metrics for k8s deployment, replicaset, replication_controller, statefulset and hpa.
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: [1636, 1637, 1644]
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+
This addition focused on providing consistency between these metrics, while
24+
also ensuring alignment with recommendations from Kubernetes.
25+
More details in https://github.com/open-telemetry/semantic-conventions/issues/1637

docs/non-normative/k8s-migration.md

Lines changed: 112 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ and one for disabling the old schema called `semconv.k8s.disableLegacy`. Then:
4343

4444
- [Summary of changes](#summary-of-changes)
4545
- [K8s network metrics](#k8s-network-metrics)
46+
- [K8s Deployment metrics](#k8s-deployment-metrics)
47+
- [K8s ReplicaSet metrics](#k8s-replicaset-metrics)
48+
- [K8s ReplicationController metrics](#k8s-replicationcontroller-metrics)
49+
- [K8s StatefulsSet metrics](#k8s-statefulsset-metrics)
50+
- [K8s HorizontalPodAutoscaler metrics](#k8s-horizontalpodautoscaler-metrics)
4651

4752
<!-- tocstop -->
4853

@@ -56,13 +61,115 @@ to bring the conventions to stable (TODO: link to specific version once it exist
5661

5762
The K8s network metrics implemented by the Collector and specifically the
5863
[kubeletstats](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.112.0/receiver/kubeletstatsreceiver/documentation.md)
59-
receiver were introduced as semantic conventions in [v1.29.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/system/k8s-metrics.md).
64+
receiver were introduced as semantic conventions
65+
in [v1.29.0](https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/system/k8s-metrics.md).
6066

6167
The changes in their attributes are the following:
6268

6369
<!-- prettier-ignore-start -->
64-
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
65-
|------------------------------------------------------------------------------------|---------------------------|
66-
| `interface` | `network.interface.name` |
67-
| `direction` | `network.io.direction` |
70+
71+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
72+
|------------------------------------------------------------------------------------|--------------------------|
73+
| `interface` | `network.interface.name` |
74+
| `direction` | `network.io.direction` |
75+
76+
<!-- prettier-ignore-end -->
77+
78+
### K8s Deployment metrics
79+
80+
The K8s Deployment metrics implemented by the Collector and specifically the
81+
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.115.0/receiver/k8sclusterreceiver/documentation.md)
82+
receiver were introduced as semantic conventions in
83+
[#1636](https://github.com/open-telemetry/semantic-conventions/pull/1636) (TODO: replace with SemConv version once
84+
available).
85+
86+
The changes in their metric names and types are the following:
87+
88+
<!-- prettier-ignore-start -->
89+
90+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
91+
|------------------------------------------------------------------------------------|--------------------------------------------------------------|
92+
| `k8s.deployment.desired` (type: `gauge`) | `k8s.deployment.desired_pods` (type: `updowncounter`) |
93+
| `k8s.deployment.available` (type: `gauge`) | `k8s.deployment.available_pods` (type: `updowncounter`) |
94+
95+
<!-- prettier-ignore-end -->
96+
97+
### K8s ReplicaSet metrics
98+
99+
The K8s ReplicaSet metrics implemented by the Collector and specifically the
100+
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.115.0/receiver/k8sclusterreceiver/documentation.md)
101+
receiver were introduced as semantic conventions in
102+
[#1636](https://github.com/open-telemetry/semantic-conventions/pull/1636) (TODO: replace with SemConv version once
103+
available).
104+
105+
The changes in their metric names and types are the following:
106+
107+
<!-- prettier-ignore-start -->
108+
109+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
110+
|------------------------------------------------------------------------------------|---------------------------------------------------------|
111+
| `k8s.replicaset.desired` (type: `gauge`) | `k8s.replicaset.desired_pods` (type: `updowncounter`) |
112+
| `k8s.replicaset.available` (type: `gauge`) | `k8s.replicaset.available_pods` (type: `updowncounter`) |
113+
114+
<!-- prettier-ignore-end -->
115+
116+
### K8s ReplicationController metrics
117+
118+
The K8s ReplicationController metrics implemented by the Collector and specifically the
119+
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.115.0/receiver/k8sclusterreceiver/documentation.md)
120+
receiver were introduced as semantic conventions in
121+
[#1636](https://github.com/open-telemetry/semantic-conventions/pull/1636) (TODO: replace with SemConv version once
122+
available).
123+
124+
The changes in their metric names and types are the following:
125+
126+
<!-- prettier-ignore-start -->
127+
128+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
129+
|------------------------------------------------------------------------------------|---------------------------------------------------------------------|
130+
| `k8s.replication_controller.desired` (type: `gauge`) | `k8s.replication_controller.desired_pods` (type: `updowncounter`) |
131+
| `k8s.replication_controller.available` (type: `gauge`) | `k8s.replication_controller.available_pods` (type: `updowncounter`) |
132+
133+
<!-- prettier-ignore-end -->
134+
135+
### K8s StatefulsSet metrics
136+
137+
The K8s StatefulsSet metrics implemented by the Collector and specifically the
138+
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.115.0/receiver/k8sclusterreceiver/documentation.md)
139+
receiver were introduced as semantic conventions in
140+
[#1636](https://github.com/open-telemetry/semantic-conventions/pull/1636) (TODO: replace with SemConv version once
141+
available).
142+
143+
The changes in their metric types are the following:
144+
145+
<!-- prettier-ignore-start -->
146+
147+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
148+
|------------------------------------------------------------------------------------|----------------------------------------------------------|
149+
| `k8s.statefulset.desired_pods` (type: `gauge`) | `k8s.statefulset.desired_pods` (type: `updowncounter`) |
150+
| `k8s.statefulset.ready_pods` (type: `gauge`) | `k8s.statefulset.ready_pods` (type: `updowncounter`) |
151+
| `k8s.statefulset.current_pods` (type: `gauge`) | `k8s.statefulset.current_pods` (type: `updowncounter`) |
152+
| `k8s.statefulset.updated_pods` (type: `gauge`) | `k8s.statefulset.updated_pods` (type: `updowncounter`) |
153+
154+
<!-- prettier-ignore-end -->
155+
156+
### K8s HorizontalPodAutoscaler metrics
157+
158+
The K8s HorizontalPodAutoscaler metrics implemented by the Collector and specifically the
159+
[k8scluster](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.115.0/receiver/k8sclusterreceiver/documentation.md)
160+
receiver were introduced as semantic conventions in
161+
[#1636](https://github.com/open-telemetry/semantic-conventions/pull/1636) (TODO: replace with SemConv version once
162+
available).
163+
164+
The changes in their metric names and types are the following:
165+
166+
<!-- prettier-ignore-start -->
167+
168+
| Old (Collector) ![changed](https://img.shields.io/badge/changed-orange?style=flat) | New |
169+
|------------------------------------------------------------------------------------|------------------------------------------------|
170+
| `k8s.hpa.desired_replicas` (type: `gauge`) | `k8s.hpa.desired_pods` (type: `updowncounter`) |
171+
| `k8s.hpa.current_replicas` (type: `gauge`) | `k8s.hpa.current_pods` (type: `updowncounter`) |
172+
| `k8s.hpa.max_replicas` (type: `gauge`) | `k8s.hpa.max_pods` (type: `updowncounter`) |
173+
| `k8s.hpa.min_replicas` (type: `gauge`) | `k8s.hpa.min_pods` (type: `updowncounter`) |
174+
68175
<!-- prettier-ignore-end -->

0 commit comments

Comments
 (0)