Add metrics for API calls - #20
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| return response, err | ||
| } | ||
|
|
||
| func operationFromRequest(request *http.Request) string { |
There was a problem hiding this comment.
I am not 100% sure about this. It kind of works but only in case all APIs follow that odd/even rule.
I copied this from https://github.com/stackitcloud/cloud-provider-stackit/blob/83f9aae577aa7e4a5b080cdbd076e6341aebd19f/pkg/metrics/http.go#L59
dd8a96d to
2d72b70
Compare
2d72b70 to
763e67b
Compare
763e67b to
ccc61b2
Compare
|
@dergeberl: The following test failed, say
Full PR test history. Your PR dashboard. Command help for this repository. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
This PR adds metrics for API calls. Similar to the metrics in
cloud-provider-stackitsee https://github.com/stackitcloud/cloud-provider-stackit/tree/main/pkg/metricsSpecial notes for your reviewer:
operationFromRequest, see also comment.I tested that the metrics are created:

Breaking changes: