kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
9.13k stars 2.95k forks source link

RequestResult metric is registered by controller-runtime #1390

Open kandulaganesh opened 1 week ago

kandulaganesh commented 1 week ago

We want to utilize the RequestResult metric in our setup.

Ideally, we would register our own metric by invoking Register(...) as described in client-go's metrics code. This would allow client-go to invoke our custom implementation, enabling us to raise the RequestResult metric.

However, we noticed that controller-runtime already registers RequestResult via this implementation, which means we cannot directly register our own metric.

Could you provide guidance on how we can capture or hook into the RequestResult metric under these circumstances? Any suggestions or workarounds would be appreciated!