Skip to content

Commit 8533d8c

Browse files
committed
fix: add missing interval label to CollectionIntervalGauge in collectOwnerPackages
- Fix CollectionIntervalGauge.WithLabelValues in collectOwnerPackages function - Resolves panic: expected 2 label values but got 1 error in owner package collection
1 parent 6c58503 commit 8533d8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/collectors/ghcr_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (gc *GHCRCollector) collectOwnerPackages(ctx context.Context, name string,
195195
}
196196

197197
gc.metrics.CollectionSuccessCounter.WithLabelValues(name, strconv.Itoa(interval)).Inc()
198-
gc.metrics.CollectionIntervalGauge.WithLabelValues(name).Set(float64(interval))
198+
gc.metrics.CollectionIntervalGauge.WithLabelValues(name, strconv.Itoa(interval)).Set(float64(interval))
199199

200200
duration := time.Since(startTime).Seconds()
201201
gc.metrics.CollectionDurationGauge.WithLabelValues(name, strconv.Itoa(interval)).Set(duration)

0 commit comments

Comments
 (0)