Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Fix Prometheus metrics #1211

Merged
merged 1 commit into from
Oct 21, 2020
Merged

Conversation

adrianludwin
Copy link
Contributor

We were using the global Prometheus registry, but controller-runtime
(now?) uses its own, separate registry. This change uses
controller-runtime's registry instead.

This change also uses the most recent OpenCensus Prometheus exporter and
removes a bunch of dead code, including direct access of the Prometheus
golang client. As a result, there are a bunch of changes in the vendor
directory.

Tested: directly inspected the /metrics endpoint on the HNC pod via
wget. Without this change, none of the custom HNC metrics are included;
with this change, they are.

We were using the global Prometheus registry, but controller-runtime
(now?) uses its own, separate registry. This change uses
controller-runtime's registry instead.

This change also uses the most recent OpenCensus Prometheus exporter and
removes a bunch of dead code, including direct access of the Prometheus
golang client. As a result, there are a bunch of changes in the vendor
directory.

Tested: directly inspected the /metrics endpoint on the HNC pod via
wget. Without this change, none of the custom HNC metrics are included;
with this change, they are.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 20, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 20, 2020
@adrianludwin
Copy link
Contributor Author

/assign @yiqigao217
/assign @rjbez17

@rjbez17
Copy link

rjbez17 commented Oct 21, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, rjbez17

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [adrianludwin,rjbez17]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b8f8eb1 into kubernetes-retired:master Oct 21, 2020
@adrianludwin adrianludwin deleted the prom branch October 21, 2020 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants