Skip to content

Commit a331c97

Browse files
committed
feat: Restore duration metric recording since it's a runtime metric
Signed-off-by: hasithsen <[email protected]>
1 parent 348b6f0 commit a331c97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/controller/kustomization_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ func (r *KustomizationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
184184
retErr = kerrors.NewAggregate([]error{retErr, err})
185185
}
186186

187+
// Record Prometheus metrics.
188+
r.Metrics.RecordDuration(ctx, obj, reconcileStart)
189+
187190
// Log and emit success event.
188191
if conditions.IsReady(obj) {
189192
msg := fmt.Sprintf("Reconciliation finished in %s, next run in %s",

0 commit comments

Comments
 (0)