k8spin-operator
k8spin-operator copied to clipboard
Prometheus metrics
Description
Current operator and the webhook does not expose any kind of metrics. We need to expose prometheus metrics from both components.
Proposal
Operator metrics for each object:
- Organizations
- Tenants (with organization tag)
- Spaces (with organization and tenant tag)
We should collect metrics about:
- Count
- Memory
- CPU
Webhook metrics:
- Number or requests
- Failed requests
- Requests process time
Before
$ curl http://k8spin-operator:12345/metrics
404
$ curl http://k8spin-operator-webhook:12345/metrics
404
After
$ curl http://k8spin-operator:12345/metrics
200
$ curl http://k8spin-operator-webhook:12345/metrics
200
Expected output
All the metrics should be documented to being able to use it in (for example) a grafana Dashboard