-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Switch from grpc-ecosystem/go-grpc-prometheus to grpc-ecosystem/go-grpc-middleware/providers/prometheus #19195
Conversation
Hi @dims. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
f7123cd
to
f80c5b2
Compare
/ok-to-test |
thanks @ivanvc |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 26 files with indirect coverage changes @@ Coverage Diff @@
## main #19195 +/- ##
==========================================
- Coverage 68.85% 68.84% -0.01%
==========================================
Files 420 420
Lines 35693 35701 +8
==========================================
+ Hits 24577 24579 +2
- Misses 9692 9702 +10
+ Partials 1424 1420 -4 Continue to review full report in Codecov by Sentry.
|
/test pull-etcd-integration-2-cpu-amd64 |
/assign @ahrtr @serathius |
Thanks @dims for the PR. I did some sanity test on this PR, and compared it with the existing main branch.
Also references: |
Do we need a test to confirm that no metric was removed? |
@ahrtr did you run with |
i think so for future-proofing! |
YES, I executed the same command on this PR and the main branch. The main branch was working as expected, but this PR did not generate the histograms metrics. |
f80c5b2
to
03554ca
Compare
@ahrtr found the issue and hopefully fixed it. Added a test as well. However, please check if i broke anything in the process of threading the option through to both the test suite and the main binary. |
cafe302
to
d3fe3e2
Compare
7c41ce2
to
95a93bf
Compare
…pc-middleware/providers/prometheus Signed-off-by: Davanum Srinivas <[email protected]>
95a93bf
to
c3e4df6
Compare
I also see a difference when comparing this PR with the main branch. When there is no any traffic at all, this PR generates nothing for
But the main branch generates/exposes all metrics with zero values, see below Metrics with zero values generated by main branch
|
@dims Just confirmed that the following patch resolves this difference perfectly!
|
Signed-off-by: Davanum Srinivas <[email protected]>
@ahrtr Done! i added a separate commit with the suggested changes (so it is easier to drop it and merge the original commit if we want to for some reason!) |
@ahrtr as i mentioned earlier tests are failing with with the suggested changes
|
It's weird.
As mentioned in #19242 (comment), the integration test does too much hack in both test and the etcdserver's bootstrap workflow, so it's hard to ensure that it's testing the exact same as the production implementation. Can you print the |
397cf13
to
e88fda2
Compare
When we execute only one integration test (your test TestAllMetricsGenerated), then everything is running well. If we execute multiple integration test cases, then it will fail to register the metrics, because the DefaultRegistereris a global variable. While e2e test case doesn't have this problem, because each e2e test case starts a new process. So I propose to remove the integration test case. @dims |
Refer to etcd-io#19195 (comment) Signed-off-by: Benjamin Wang <[email protected]>
e88fda2
to
1f33baf
Compare
Signed-off-by: Benjamin Wang <[email protected]>
@dims @serathius This PR should be ready to go. Please take a look. Also cc @fuweid |
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.
LGTM
Thanks @dims for the PR, also happy for the cooperation.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, dims, fuweid 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:
Approvers can indicate their approval by writing |
@ahrtr this was a fun one! learnt a lot! |
Refer to etcd-io#19195 (comment) Signed-off-by: Benjamin Wang <[email protected]>
Reviving previous effort from: #17974
xref: kubernetes/kubernetes#128583
Added a new test to make sure we are not missing any expected metrics.
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.