Skip to content

Commit 1869812

Browse files
Fix cortex_scheduler_pipeline_step_shift_origin metric: use outidx
1 parent 86c3f26 commit 1869812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/scheduler/monitor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func (s *StepMonitor) Run(request api.Request) (map[string]float64, error) {
218218
// Observe how far it was moved.
219219
originalIdx := slices.Index(hostsIn, hostsOut[idx])
220220
if s.stepReorderingsObserver != nil {
221-
o := s.stepReorderingsObserver.WithLabelValues(stepName, hostsOut[idx])
221+
o := s.stepReorderingsObserver.WithLabelValues(stepName, strconv.Itoa(idx))
222222
o.Observe(float64(originalIdx))
223223
}
224224
slog.Info(

0 commit comments

Comments
 (0)