-
Notifications
You must be signed in to change notification settings - Fork 44
Add metrics about KnativeServing CR edits #233
Conversation
| r.config.DeleteAll(&metav1.DeleteOptions{}) | ||
| // Report the KnativeServing edit when deleting an existed KnativeServing | ||
| if _, ok := r.servings[key]; ok { | ||
| r.StatsReporter.ReportKnativeServingEdit(key) |
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.
test?
| newGen := original.Generation | ||
| oldGen, ok := r.servings[key] | ||
| if (ok && newGen == oldGen+1) || (!ok && newGen == 1) { | ||
| r.StatsReporter.ReportKnativeServingEdit(key) |
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.
Can the generation be attached?
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.
Attaching the generation may be not that useful for the metrics only counting the number of changes.
Add stats reporter to reconciler base Report metrics about KnativeServing CR change
|
The following is the coverage report on the affected files.
|
|
Could you test with stackdriver by setting these in config-observability? Otherwise, |
|
@anniefu Tested with prometheus and stackdriver, and both worked as expected. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jihuin, trshafer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
Serving operator can emit metrics on KnativeServing CR edits, including creation, modification and deletion.
Steps to test metrics with Prometheus exporter (default):
kubectl port-forward ${{operator_pod_name}} 9090localhost:9090/metricsRelease Note