-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor #41807
Conversation
/lgtm |
18436f5
to
884be7f
Compare
FYI, just built and pushed the new image to |
Made a minor spelling correction (from GetPid to Getpid) after Wojtek's lgtm. So adding the label again. |
884be7f
to
5cbc6a0
Compare
Fixed gofmt failure and adding lgtm again. |
/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. |
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.
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.
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.
Removed it. Thanks for clarifying.
5cbc6a0
to
3391404
Compare
@@ -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. |
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.
Please remove the comment - it doesn't bring any value.
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.
Fixed.
…cd-version-monitor
3391404
to
d5a28b3
Compare
[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 |
/lgtm |
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781) |
Unregister metrics we do not want from the etcd version metrics handler.
cc @wojtek-t @piosz