cyclops
cyclops copied to clipboard
๐feat(cyclops-ctrl): adds prometheus metrics to reconciler
closes #598
๐ Description
- added required reconciler metrics to the Prometheus monitor
- currently added metrics are
type Monitor struct {
ModulesDeployed prometheus.Gauge
CacheHits prometheus.Gauge
CacheMisses prometheus.Gauge
CacheKeysAdded prometheus.Gauge
CacheCostAdded prometheus.Gauge
CacheKeysEvicted prometheus.Gauge
CacheCostEvicted prometheus.Gauge
// Reconciler Metrics
ReconcilerDuration prometheus.Histogram
NoOfReconciliations prometheus.Counter
FailedReconciliations prometheus.Counter
}
- added methods to update the reconciler metrics
- added increment for
no_of_reconciliations
for every attempted reconciliation - added increment for
failed_reconciliations
for every failed reconciliation - added deferred function call to observe the amount of time spent in reconciliation
โ Checks
- [โ ] I have tested my code (provide screenshots or screen recordings of a working solution)
- [โ ] I have performed a self-review of my code