Added metrics for restclient and workqueue#5731
Conversation
97187d2 to
07f64a6
Compare
|
can you add a test/e2e to make sure it worked as expected. |
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (15.00%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #5731 +/- ##
==========================================
+ Coverage 65.21% 65.27% +0.05%
==========================================
Files 214 217 +3
Lines 34321 34666 +345
==========================================
+ Hits 22384 22628 +244
- Misses 10584 10660 +76
- Partials 1353 1378 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
07f64a6 to
dab49f3
Compare
|
/retest |
dab49f3 to
8e86705
Compare
8e86705 to
10d793f
Compare
10d793f to
eeba96d
Compare
Signed-off-by: Ivan Makarychev <makarichev.ivan@gmail.com>
eeba96d to
af16e79
Compare
|
@zirain, could you take a look? |
| "sigs.k8s.io/controller-runtime/pkg/metrics" | ||
| ) | ||
|
|
||
| // This file is copied and adapted from k8s.io/component-base/metrics/prometheus/workqueue |
There was a problem hiding this comment.
can you share how this is different from https://github.com/kubernetes-sigs/controller-runtime/blob/6ad5c1dd4418489606d19dfb87bf38905b440561/pkg/internal/metrics/workqueue.go#L23
which is being set by default
https://github.com/kubernetes-sigs/controller-runtime/blob/6ad5c1dd4418489606d19dfb87bf38905b440561/pkg/controller/priorityqueue/priorityqueue.go#L58
There was a problem hiding this comment.
reread the title description, trying to better understand the conflict
This PR introduces additional metrics to improve observability around the Envoy Gateway, specifically focusing on the REST client and the workqueue.
Motivation
There are currently several issues that limit our ability to effectively monitor and troubleshoot the system:
Lack of Metrics: The limited set of existing metrics makes it difficult to gain insights into the performance and health of the Envoy Gateway. This PR enhances observability and makes it easier to identify and diagnose performance issues—particularly those related to the workqueue.
Workqueue Metrics Conflict: Metrics for the workqueue are registered both by controller-runtime and k8s.io/component-base via init() functions. However, only one of these libraries can successfully register the metrics. In our setup, k8s.io/component-base wins, which results in the metrics from controller-runtime not being exposed at all.
This PR resolves these issues by explicitly adding and managing the necessary metrics, ensuring better visibility into queue behavior and client interactions.
Release Notes: Yes