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

Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor #41807

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

shyamjvs
Copy link
Member

Unregister metrics we do not want from the etcd version metrics handler.

cc @wojtek-t @piosz

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 21, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Feb 21, 2017
@shyamjvs shyamjvs assigned wojtek-t and unassigned mikedanese Feb 21, 2017
@shyamjvs shyamjvs added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Feb 21, 2017
@wojtek-t
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2017
@shyamjvs
Copy link
Member Author

FYI, just built and pushed the new image to gcr.io/google-containers/etcd-version-monitor:0.1.0.

@shyamjvs
Copy link
Member Author

Made a minor spelling correction (from GetPid to Getpid) after Wojtek's lgtm. So adding the label again.

@shyamjvs shyamjvs added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2017
@shyamjvs
Copy link
Member Author

Fixed gofmt failure and adding lgtm again.

@shyamjvs shyamjvs added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2017
@wojtek-t
Copy link
Member

/lgtm

@@ -218,7 +219,8 @@ func main() {
// Register the metrics we defined above with prometheus.
prometheus.MustRegister(etcdVersion)
prometheus.MustRegister(etcdGRPCRequestsTotal)
prometheus.Unregister(prometheus.NewGoCollector()) // Unregister go metrics.
prometheus.Unregister(prometheus.NewGoCollector()) // Unregister go metrics.
prometheus.Unregister(prometheus.NewProcessCollector(os.Getpid(), "")) // Unregister process metrics.
Copy link
Member

Choose a reason for hiding this comment

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

As I wrote yesterday on IM we need an information when the process was started in order to export cumulative metrics. I'm fine with leaving some extra metrics which contains that information, so basically please remove this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed it. Thanks for clarifying.

@wojtek-t wojtek-t removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2017
@@ -218,7 +218,7 @@ func main() {
// Register the metrics we defined above with prometheus.
prometheus.MustRegister(etcdVersion)
prometheus.MustRegister(etcdGRPCRequestsTotal)
prometheus.Unregister(prometheus.NewGoCollector()) // Unregister go metrics.
prometheus.Unregister(prometheus.NewGoCollector()) // Unregister go metrics.
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the comment - it doesn't bring any value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: shyamjvs, wojtek-t

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@wojtek-t
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2017
@shyamjvs
Copy link
Member Author

@k8s-bot non-cri e2e test this
@k8s-bot gci gce e2e test this
@k8s-bot gce etcd3 e2e test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781)

@k8s-github-robot k8s-github-robot merged commit 8fc311c into kubernetes:master Feb 23, 2017
@shyamjvs shyamjvs deleted the remove-fart-metrics branch April 24, 2017 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants