Closed Fricounet closed 1 year ago
Hi @Fricounet , we discussed about this and agreed this is useful. Please go ahead and submit PRs. Thanks!
I like it, but please make it configurable via --enable-pprof
or something similar. Some CSI drivers need to use host network, i.e. the port for metrics + pprof will be open on the node. And at the same time, people may not like exposing CPU profiles, heap data and whatnot publicly on that node.
Currently, some of the CSI sidecars support pprof profliing (like the azuredisk-csi-driver, the secrets-store-csi-driver or the node-driver-registrar but not all. I believe it could be useful to add this option on all CSI components and this repo seems like a good place to do it.
It could probably go in the metrics.go file in the
CSIMetricsManager
interface with aRegisterPprofToServer
function that would register the pprof handlers.What do you folks think about it? I would be happy to contribute this (and the implementation in the CSI sidecars) if that is something folks are willing to see 😄