-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add error counter for k8s client #11774
Conversation
Signed-off-by: Alex Leong <[email protected]>
@@ -62,6 +62,14 @@ var ( | |||
[]string{"client", "code", "method"}, | |||
) | |||
|
|||
clientErrorCounter = prometheus.NewCounterVec( |
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.
I think clientErrorCounter
needs to be registered in the init()
function in order to be accounted for.
Signed-off-by: Alex Leong <[email protected]>
With some manual testing I can see this counter increase when connection to the k8s api is interrupted. Surprisingly, the logs are somewhat light in terms of information when this happens. At debug level we see messages like:
showing that API responses are returning in 0 milliseconds, but not indicating that this is because of a failed connection. We have to increase the log level to trace before we see:
showing that there was a connection refused. |
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 👍
This edge release contains improvements to the logging and diagnostics of the destination controller. * Added a control plane metric to count errors talking to the Kubernetes API ([#11774]) * Fixed an issue causing spurious destination controller error messages for profile lookups on unmeshed pods with port in default opaque list ([#11550]) [#11774]: #11774 [#11550]: #11550 Signed-off-by: Alex Leong <[email protected]>
We add a
http_client_errors_total
counter metric to control plane components to measure when requests to the k8s API fail without a response.