Skip to content
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

Add process_cpu_seconds_total to kube_apiserver_metrics check #19415

Merged

Conversation

justin-lesko
Copy link
Contributor

@justin-lesko justin-lesko commented Jan 16, 2025

What does this PR do?

This PR adds process_cpu_seconds_total to the list of metrics collected by the kube_apiserver_metrics check and remaps it to process_cpu_total

Motivation

GitHub issue: #18219

QA

Tested with a custom built datadog-agent container that includes this change.

Screenshot 2025-01-17 at 10 43 34 AM

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@justin-lesko justin-lesko marked this pull request as ready for review January 16, 2025 18:49
@justin-lesko justin-lesko requested review from a team as code owners January 16, 2025 18:49
Copy link
Member

@sblumenthal sblumenthal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, but please add the new metric to the metadata.csv file somewhere

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.52%. Comparing base (bef0a2f) to head (40c286b).
Report is 4 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
jboss_wildfly ?
kafka ?
kube_apiserver_metrics 97.75% <ø> (ø)
presto ?
weblogic ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nits on the metrics name remapping.
also can be good to add the metrics to the Out of the box dashboard https://github.com/DataDog/integrations-core/blob/master/kube_apiserver_metrics/assets/dashboards/overview.json
(can be done in a next PR)

@justin-lesko justin-lesko force-pushed the justin/CONTINT-4486_add_process_cpu_seconds_total branch from 57f3af2 to 40c286b Compare January 16, 2025 21:23
@justin-lesko justin-lesko added this pull request to the merge queue Jan 17, 2025
Merged via the queue into master with commit 33a15dd Jan 17, 2025
42 of 43 checks passed
@justin-lesko justin-lesko deleted the justin/CONTINT-4486_add_process_cpu_seconds_total branch January 17, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants