kube-rs / controller-rs

A kubernetes reference controller
Apache License 2.0
270 stars 28 forks source link

Try out `measured` for metrics #71

Open clux opened 3 months ago

clux commented 3 months ago

A working POC for conradludgate/measured ripping out tikv/rust-prometheus. It did take me about 3h of cranking to make everything work like before, but it's a one time cost.

PROS:

Note that the fixed cardinality stuff is not something we actually use, nor a main focus atm, as a controller benefits from dynamic labels for the objects it is reconciling and they are generally bound the cluster size anyway. But I can see it being useful for constraining error sizes down the road (the current error_label thing is very lazy and could blow up a bit under bad conditions).

CONS:

I believe opemetrics text format with exemplars could be easily retrofitted on top of measured, so maybe that's a way forward.