@@ -27,6 +27,13 @@ const (
27
27
APPROVAL_LABEL = "approval"
28
28
WARNING_LABEL = "warning"
29
29
GVK_LABEL = "gvk"
30
+
31
+ // Controller names
32
+ operatorController = "operator"
33
+ adoptionCSVController = "adoption_csv"
34
+ adoptionSubscriptionController = "adoption_subscription"
35
+ operatorConditionController = "operator_condition"
36
+ operatorConditionGeneratorController = "operator_condition_generator"
30
37
)
31
38
32
39
type MetricsProvider interface {
@@ -204,6 +211,9 @@ var (
204
211
// Subscription objects. The key of a record is the Subscription name, while the value
205
212
// is struct containing label values used in the counter
206
213
subscriptionSyncCounters = make (map [string ]subscriptionSyncLabelValues )
214
+
215
+ // Experimental Metrics
216
+ reconcileMetrics = map [string ]prometheus.Counter {}
207
217
)
208
218
209
219
type subscriptionSyncLabelValues struct {
@@ -334,3 +344,29 @@ func RegisterDependencyResolutionFailure(duration time.Duration) {
334
344
func EmitInstallPlanWarning () {
335
345
installPlanWarningCount .Inc ()
336
346
}
347
+
348
+ func EmitOperatorReconcile () {
349
+ emitReconcile (operatorConditionController )
350
+ }
351
+
352
+ func EmitAdoptionCSVReconcile () {
353
+ emitReconcile (adoptionCSVController )
354
+ }
355
+
356
+ func EmitAdoptionSubscriptionReconcile () {
357
+ emitReconcile (adoptionSubscriptionController )
358
+ }
359
+
360
+ func EmitOperatorConditionReconcile () {
361
+ emitReconcile (operatorConditionController )
362
+ }
363
+
364
+ func EmitOperatorConditionGeneratorReconcile () {
365
+ emitReconcile (operatorConditionGeneratorController )
366
+ }
367
+
368
+ func emitReconcile (name string ) {
369
+ if counter , ok := reconcileMetrics [name ]; ok {
370
+ counter .Inc ()
371
+ }
372
+ }
0 commit comments