-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[receiver/kubeletstats] Add feature gate for cpu utilization metrics' deprecation #35139
[receiver/kubeletstats] Add feature gate for cpu utilization metrics' deprecation #35139
Conversation
55270f1
to
34525a5
Compare
858405b
to
732836c
Compare
Users can use the following metrics instead: | ||
- `k8s.node.cpu.usage` | ||
- `k8s.pod.cpu.usage` | ||
- `container.cpu.usage` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would maybe add a note that usage metrics are not utilization metrics. So it's not one to one replacement.
Something like:
Note: usage metrics show usage in terms of resources such as CPU / bytes, not percentage used.
Previous utilization metric values were computed incorrectly.
732836c
to
a699e0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
a699e0b
to
211faf9
Compare
… deprecation Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
25d26e0
to
7aef1b5
Compare
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
7aef1b5
to
a07194c
Compare
/cc @dmitryax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… deprecation (open-telemetry#35139) **Description:** This PR adds a feature gate as discussed at open-telemetry#27885 (comment). If the feature gate is enabled the `container.cpu.utilization`, `k8s.pod.cpu.utilization` and `k8s.node.cpu.utilization` metrics will be not be disabled being replaced by the `container.cpu.usage`, `k8s.pod.cpu.usage` and `k8s.node.cpu.usage`. ### Feature gate schedule - alpha: when enabled it makes the .cpu.usage metrics enabled by default - beta: .cpu.usage metrics are enabled by default and any configuration enabling the deprecated .cpu.utilization metrics will be failing. Explicitly disabling the feature gate provides the old (deprecated) behavior. - stable: .cpu.usage metrics are enabled by default and the deprecated metrics are completely removed. - Removed three releases after `stable`. **Documentation:** ### How to test this 1. Using the following configuration ```yaml mode: daemonset presets: kubeletMetrics: enabled: true image: repository: otelcontribcol-dev tag: "latest" pullPolicy: IfNotPresent command: name: otelcontribcol extraArgs: [--feature-gates=receiver.kubeletstats.enableCPUUsageMetrics] config: exporters: debug: verbosity: normal receivers: kubeletstats: collection_interval: 10s auth_type: 'serviceAccount' endpoint: '${env:K8S_NODE_NAME}:10250' insecure_skip_verify: true service: pipelines: metrics: receivers: [kubeletstats] processors: [batch] exporters: [debug] ``` 2. Ensure that only the `.cpu.usage` metrics are reported. 3. Disable the feature gate and check that only the `.cpu.utilization` metrics are reported. --------- Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Description:
This PR adds a feature gate as discussed at #27885 (comment).
If the feature gate is enabled the
container.cpu.utilization
,k8s.pod.cpu.utilization
andk8s.node.cpu.utilization
metrics will be not be disabled being replaced by thecontainer.cpu.usage
,k8s.pod.cpu.usage
andk8s.node.cpu.usage
.Feature gate schedule
stable
.@TylerHelmuth @dmitryax let me know what you think about this approach.
Link to tracking Issue:
Testing:
Documentation:
How to test this
.cpu.usage
metrics are reported..cpu.utilization
metrics are reported.