source-controller icon indicating copy to clipboard operation
source-controller copied to clipboard

Expose metrics about internal operations during a reconciler run

Open aryan9600 opened this issue 2 years ago • 3 comments

At the moment, we only expose the readiness of the object and the duration of the reconciler run. It'd be helpful for both users and developers if we expose metrics about internal ops such as garbage collection, remote operations (git fetch, helm pull, etc). This would enable us to analyze and optimize the operations and give users a clearer picture of how the controller is working.

aryan9600 avatar Apr 06 '22 06:04 aryan9600

hi @aryan9600, I am interested to work on this if ok

cwyl02 avatar Aug 03 '22 18:08 cwyl02

hi @aryan9600 finally get some time to look deeper into this. And I see we have a cacheRecorder. Should we try to reuse that pattern where it fits? Also, I guess for every metric we come up with, namespace is always a desirable dimension?

cwyl02 avatar Sep 08 '22 01:09 cwyl02

Yes, using that pattern seems like a good idea for now, we can think about expanding the Recorder in fluxcd/pkg/runtime/metrics later. I'd say the namespace and name labels are desirable for all metrics. Developers and users should be able to see stuff like the avg. duration of git checkout or a helm pull for each source object, which would enable them to have a clearer picture of the controller's behaviour.

aryan9600 avatar Sep 10 '22 12:09 aryan9600