-
Notifications
You must be signed in to change notification settings - Fork 448
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 prometheus metrics for experiment and trial #870
Conversation
|
/test kubeflow-katib-presubmit |
return reconcile.Result{}, err | ||
} else { | ||
if !instance.ObjectMeta.DeletionTimestamp.IsZero() { | ||
utilv1alpha3.IncreaseExperimentsDeletedCount() |
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.
Instead of Increase, increment seems more appropriate?
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.
do you mean rename IncreaseExperimentsDeletedCount
to Increment ExperimentsDeletedCount
? If so, I think Increase
is better, since it is a verb
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.
@hougangliu when we specify counters, we typically specify the term Increment
. See Inc
definition in prometheus https://github.com/kubeflow/katib/blob/master/vendor/github.com/prometheus/client_golang/prometheus/counter.go#L37
Or, should we directly call experimentsDeletedCount.Inc() ?
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.
Yes, I find it. In fact https://github.com/kubeflow/katib/blob/master/vendor/github.com/prometheus/client_golang/prometheus/counter.go#L37 should use increase
too, it should be a typo error.
The reason why I didn't use experimentsDeletedCount.Inc()
is that other package "pkg/controller.v1alpha3/experiment/util" also call it, but experimentsDeletedCount
cannot be access by other packages
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnugeorge 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 |
/test kubeflow-katib-presubmit |
@hougangliu Rebase upstream master may be helpful for CI failures. |
OK, rebased. Thanks |
/lgtm |
|
||
var ( | ||
experimentsDeletedCount = prometheus.NewCounter(prometheus.CounterOpts{ | ||
Name: "katib_experiment_deleted", |
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.
Do we need to rename the metrics?
What this PR does / why we need it:
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 #
Special notes for your reviewer:
Release note:
This change is