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 "disable_specific_metrics" which can remove specific metric by name or regex #2774

Merged
merged 1 commit into from Mar 5, 2021
Merged

Conversation

Alexbyy
Copy link
Contributor

@Alexbyy Alexbyy commented Jan 5, 2021

#2769
This param is a denyList which named "disable_specific_metrics". Comma-separated list of metrics not to be enabled.It can remove specific metric by name or regex.

@google-cla
Copy link

google-cla bot commented Jan 5, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jan 5, 2021
@k8s-ci-robot
Copy link
Collaborator

Hi @Alexbyy. Thanks for your PR.

I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Alexbyy
Copy link
Contributor Author

Alexbyy commented Jan 5, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jan 5, 2021
Copy link
Collaborator

@iwankgb iwankgb left a comment

Choose a reason for hiding this comment

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

This code seems to be copied from kube-state-metrics but misses licence requirements (Apache 2 requires you to state when code from a project is used elsewhere and kube-state-metrics uses Apache 2).
I added some comments too.

metrics/black_list.go Outdated Show resolved Hide resolved
metrics/black_list.go Outdated Show resolved Hide resolved
cmd/cadvisor.go Outdated Show resolved Hide resolved
metrics/prometheus.go Show resolved Hide resolved
@Alexbyy Alexbyy requested a review from iwankgb February 8, 2021 03:38
cmd/cadvisor.go Outdated Show resolved Hide resolved
metrics/deny_list.go Outdated Show resolved Hide resolved
cmd/go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
metrics/deny_list.go Outdated Show resolved Hide resolved
metrics/deny_list.go Outdated Show resolved Hide resolved
metrics/prometheus.go Show resolved Hide resolved
metrics/deny_list.go Show resolved Hide resolved
metrics/deny_list.go Outdated Show resolved Hide resolved
cmd/cadvisor.go Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@Alexbyy Alexbyy requested a review from iwankgb February 26, 2021 02:30
@Alexbyy
Copy link
Contributor Author

Alexbyy commented Feb 26, 2021

Would you tell me How can I triger the pull-cadvisor-e2e check? It's always waiting for status to be reported
@iwankgb
Many thanks!

@iwankgb
Copy link
Collaborator

iwankgb commented Feb 26, 2021

/ok-to-test

metrics/deny_list_test.go Outdated Show resolved Hide resolved
metrics/prometheus_machine_test.go Outdated Show resolved Hide resolved
metrics/deny_list_test.go Outdated Show resolved Hide resolved
metrics/deny_list_test.go Show resolved Hide resolved
metrics/prometheus_machine_test.go Outdated Show resolved Hide resolved
metrics/prometheus_test.go Outdated Show resolved Hide resolved
metrics/prometheus_test.go Outdated Show resolved Hide resolved
metrics/prometheus_test.go Outdated Show resolved Hide resolved
metrics/deny_list_test.go Outdated Show resolved Hide resolved
metrics/deny_list_test.go Outdated Show resolved Hide resolved
@Alexbyy Alexbyy requested a review from iwankgb February 27, 2021 12:23
Copy link
Collaborator

@iwankgb iwankgb left a comment

Choose a reason for hiding this comment

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

@bobbypage I consider this work to be complete. Can you review, please?

@iwankgb
Copy link
Collaborator

iwankgb commented Mar 2, 2021

LGTM

@bobbypage bobbypage self-assigned this Mar 2, 2021
Copy link
Collaborator

@bobbypage bobbypage left a comment

Choose a reason for hiding this comment

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

Couple small comments. Can you please also squash this PR? Thanks!

cmd/cadvisor.go Show resolved Hide resolved
cmd/cadvisor.go Outdated Show resolved Hide resolved
cmd/cadvisor.go Outdated Show resolved Hide resolved
@Alexbyy Alexbyy closed this Mar 4, 2021
@Alexbyy Alexbyy reopened this Mar 5, 2021
@Alexbyy Alexbyy requested a review from bobbypage March 5, 2021 02:39
@Alexbyy
Copy link
Contributor Author

Alexbyy commented Mar 5, 2021

Couple small comments. Can you please also squash this PR? Thanks!

I have done these requests,review it, please!
And could you tell me why these six tests didn't be triggered?It's status is not "in progress"
image

@bobbypage
Copy link
Collaborator

Couple small comments. Can you please also squash this PR? Thanks!

I have done these requests,review it, please!
And could you tell me why these six tests didn't be triggered?It's status is not "in progress"
image

I think that's somehow related to #2818 which dropped github actions on 1.14. Not sure, why it's still showing up, but the important thing is the 1.15 / 1.16 variants.

@bobbypage
Copy link
Collaborator

bobbypage commented Mar 5, 2021

thanks for the updates. Can you please also send a followup PR to update the docs https://github.com/google/cadvisor/blob/master/docs/runtime_options.md with the new flag as well? Thanks!

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