webhook: register metrics only with default stats reporter
This is a followup from knative/pkg#2931. RegisterMetrics may register unwanted metrics if the default stats reporter is not used.
/kind cleanup
None
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: zhouhaibing089 Once this PR has been reviewed and has the lgtm label, please assign creydr for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Hi @zhouhaibing089. Thanks for your PR.
I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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/test-infra repository.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.77%. Comparing base (
03bf3de) to head (220f45b). Report is 115 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3005 +/- ##
==========================================
+ Coverage 78.75% 78.77% +0.01%
==========================================
Files 188 188
Lines 11107 8870 -2237
==========================================
- Hits 8747 6987 -1760
+ Misses 2094 1617 -477
Partials 266 266
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/ok-to-test
This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.
This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.