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_reconciliationsfor every attempted reconciliation - added increment for
failed_reconciliationsfor 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
βΉ Additional context
@quest-bot loot #598
Quest PR submitted!
@naineel1209, you are attempting to solve the issue and loot this Quest. Will you be successful?
Questions? Check out the docs.