Skip to content

Commit

Permalink
Add duration to callCancelDelayedDownscale logs (#185)
Browse files Browse the repository at this point in the history
I'm debugging a reconcilliatin which took 20m. I suspect one ingester was blocking the whole reconcile loop.
  • Loading branch information
dimitarvdimitrov authored Dec 11, 2024
1 parent c7f8d7a commit 2810ba0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/delay.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ func callCancelDelayedDownscale(ctx context.Context, logger log.Logger, client h
g.Go(func() error {
target := ep.url.String()

epLogger := log.With(logger, "pod", ep.podName, "url", target)
requestStart := time.Now()
epLogger := log.With(logger, "pod", ep.podName, "url", target, "duration", log.Valuer(func() interface{} { return time.Since(requestStart) }))

req, err := http.NewRequestWithContext(ctx, http.MethodDelete, target, nil)
if err != nil {
Expand Down

0 comments on commit 2810ba0

Please sign in to comment.