Skip to content

Commit

Permalink
feat: Restore duration metric recording since it's a runtime metric
Browse files Browse the repository at this point in the history
Signed-off-by: hasithsen <[email protected]>
  • Loading branch information
hasithsen committed Dec 11, 2024
1 parent c6bcf54 commit 3389339
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/controller/receiver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ func (r *ReceiverReconciler) Reconcile(ctx context.Context, req ctrl.Request) (r
retErr = kerrors.NewAggregate([]error{retErr, err})
}

// Record Prometheus metrics.
r.Metrics.RecordDuration(ctx, obj, reconcileStart)

// Emit warning event if the reconciliation failed.
if retErr != nil {
r.Event(obj, corev1.EventTypeWarning, meta.FailedReason, retErr.Error())
Expand Down

0 comments on commit 3389339

Please sign in to comment.