Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] [receiver/kubeletstats] move utilization metrics in standalon…
…e helper func (open-telemetry#33335) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> `kubeletstats` receiver performs the CPU metrics addition in the [`addCPUMetrics`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.101.0/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go#L13) helper function. This function calls respectively the [`addCPUUsageMetric`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.101.0/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go#L21) and the [`addCPUTimeMetric`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.101.0/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go#L37). However the [`addCPUUsageMetric`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.101.0/receiver/kubeletstatsreceiver/internal/kubelet/cpu.go#L21) adds not only the `*.usage` metric but some `*utilization` ones as well. This change moves the addition of the `*utilization` metrics to a standalone `addCPUUtilizationMetrics` helper function. **Link to tracking Issue:** <Issue number if applicable> - **Testing:** <Describe what testing was performed and which tests were added.> - **Documentation:** <Describe the documentation added.> - --------- Signed-off-by: ChrsMark <[email protected]>
- Loading branch information