Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Adopt for the kubelet cpu utilization metrics deprecation
The following metrics emitted by kubeletstats receiver were deprecated: - k8s.node.cpu.utilization - k8s.pod.cpu.utilization - container.cpu.utilization See open-telemetry/opentelemetry-collector-contrib#25901 for more details. Those metrics are already excluded by default in the signalfx exporter. So if we don't do anything, user will see the following confusing warnings: ``` 2024-02-06T19:21:44.773Z warn metadata/generated_metrics.go:2894 [WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.773Z warn metadata/generated_metrics.go:2897 [WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.773Z warn metadata/generated_metrics.go:2900 [WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2894 [WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2897 [WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2900 [WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2894 [WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2897 [WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2900 [WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2894 [WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2897 [WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} 2024-02-06T19:21:44.774Z warn metadata/generated_metrics.go:2900 [WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead. {"kind": "receiver", "name": "kubeletstats", "data_type": "metrics"} ``` Potentially we couldn't just explicitly disable them in the default k8s configuration on the receiver side. The problem is that the exclusion on the signalfx exporter side potentially can be disabled by users. For those users, we actually want to show the warnings. So we need to add another converter until the metric is disabled on the kubelet receiver side by default. The converter looks at the signalfx exporter in user's config, and if metrics are not explicitly enabled on the exporter side, it disables them on the kubelet receiver side to supress the warnings. The converted required to copy `dpfilters` package from signal exporter. This will be removed along with the converter in a few releases.
- Loading branch information