diff --git a/flytepropeller/pkg/controller/handler.go b/flytepropeller/pkg/controller/handler.go index 94e8ab6c12..49c2c21549 100644 --- a/flytepropeller/pkg/controller/handler.go +++ b/flytepropeller/pkg/controller/handler.go @@ -230,7 +230,7 @@ func (p *Propeller) Handle(ctx context.Context, namespace, name string) error { } streak := 0 - defer p.metrics.StreakLength.Add(ctx, float64(streak)) + defer func() { p.metrics.StreakLength.Add(ctx, float64(streak)) }() maxLength := p.cfg.MaxStreakLength if maxLength <= 0 {