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

Stop using the global prometheus registry #1460

Merged
merged 3 commits into from
May 30, 2017
Merged

Stop using the global prometheus registry #1460

merged 3 commits into from
May 30, 2017

Conversation

grobie
Copy link
Contributor

@grobie grobie commented Sep 14, 2016

Replace usage of the global Prometheus registry with a private registry
object which will be exported under the given prometheus path.

Fixes #1459.

@k8s-bot
Copy link
Collaborator

k8s-bot commented Sep 14, 2016

Jenkins GCE e2e

Build/test passed for commit d30400f.

@grobie
Copy link
Contributor Author

grobie commented Sep 14, 2016

This removes the http_* metrics. The instrument handler is deprecated as it needs to be rewritten. Not sure you would like to keep them?

@grobie
Copy link
Contributor Author

grobie commented Sep 14, 2016

Depending on the outcome of the discussion in kubernetes/kubernetes#32638 we'll need to change the integration of cAdvsior in the kubelet once this PR is merged. We probably could also just stop using RegisterPrometheusHandler in the kubernetes code base to avoid the usage of the global registry.

@jimmidyson
Copy link
Collaborator

👍

I don't mind the loss of http_* metrics.

@jimmidyson
Copy link
Collaborator

@grobie Needs a rebase please.

@grobie
Copy link
Contributor Author

grobie commented Sep 20, 2016

@jimmidyson done

@k8s-bot
Copy link
Collaborator

k8s-bot commented Sep 20, 2016

Jenkins GCE e2e

Build/test passed for commit 2720a41.

@cmluciano
Copy link

Is this awaiting a maintainer review?

@googlebot
Copy link
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@grobie
Copy link
Contributor Author

grobie commented Apr 16, 2017

Anything left for me to do here? If you're not going to accept this, I can also just close it. @jimmidyson @dashpole

@dashpole
Copy link
Collaborator

W0416 16:16:43.668] vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go:75: undefined: prometheus.DefaultGatherer
W0416 16:16:43.668] vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go:80: undefined: prometheus.Gatherer
Looks like it doesnt compile?

@cmluciano
Copy link

Might be related prometheus/client_golang@f0c45ac ?

@grobie
Copy link
Contributor Author

grobie commented Apr 22, 2017

I'm sorry for the noise @dashpole. I updated the dependencies (which will bring several improvements to the metrics exported by Prometheus) and that fixed the build.

@dashpole
Copy link
Collaborator

sorry, this fell off of my radar.
please rebase and squash

@dashpole dashpole self-assigned this May 23, 2017
grobie added 2 commits May 23, 2017 17:37
Replace usage of the global Prometheus registry with a private registry
object which will be exported under the given prometheus path.
@grobie
Copy link
Contributor Author

grobie commented May 23, 2017

@dashpole you sure you want me to squash these two commits together? I'm not sure I see the point, they are independent changes which can be applied in isolation. Given the massive diff caused by vendor updates, I understood it to be best practice to separate them from actual code changes.

@dashpole
Copy link
Collaborator

usually, we just squash to make the git tree more readable, but I see your point. We can merge this as is once tests pass.

@grobie
Copy link
Contributor Author

grobie commented May 30, 2017

@dashpole another week of ping pong ;-)

@dashpole
Copy link
Collaborator

Ill see if I can get the test infra stuff fixed today. Then we can merge this.

@Random-Liu
Copy link
Member

Verified that this PR causes #1671 and kubernetes/kubernetes#47744.

It seems that Prometheus v0.8.0 added some consistency check prometheus/client_golang#214, which breaks the metrics.

Filed #1679 to work around this for now. We should figure out and fix the inconsistent metrics in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants