-
Notifications
You must be signed in to change notification settings - Fork 531
feat: add custom kubefed metrics #1196
feat: add custom kubefed metrics #1196
Conversation
b68b143
to
89084be
Compare
89084be
to
1f79230
Compare
@jimmidyson could you review again this PR ? I used a grafana dashboard to validate the metrics on a running cluster to which I joined two clusters |
/assign @jimmidyson |
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.
If we add these metric as is can we change them to also track the errors in some of the operations like join and unjoin in follow up PR? Or would that imply major changes?
@@ -257,6 +260,9 @@ func (cc *ClusterController) updateIndividualClusterStatus(cluster *fedv1b1.Kube | |||
if err := cc.client.UpdateStatus(context.TODO(), cluster); err != nil { | |||
klog.Warningf("Failed to update the status of cluster %q: %v", cluster.Name, err) | |||
} | |||
|
|||
metrics.ClusterHealthStatusDurationFromStart(clusterHealthStatusStart) |
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.
Why didn't you use a defer like you did here?
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.
It wasn't intentional, I started using them in a way. I now adapted to run as a defer
call
35a230d
to
de0b73a
Compare
de0b73a
to
e17725d
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hectorj2f, pmorie 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 |
Yes, @sreis we could easily adapt the code to add metrics to register the different type of errors. |
/lgtm |
What this PR does / why we need it:
It adds kubefed custom metrics to the list of metrics exposed and serve by #1193. It is a follow-up PR that allows to have a better view of the duration of some of the complex kubefed operations.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
related to: #1194
Special notes for your reviewer:
I created a home made grafana dashboard to testthese metrics: