diff --git a/internal/proxy/director/layer/queue/queue.go b/internal/proxy/director/layer/queue/queue.go index fa72c34..e6068b5 100644 --- a/internal/proxy/director/layer/queue/queue.go +++ b/internal/proxy/director/layer/queue/queue.go @@ -65,7 +65,7 @@ func (q *Queue) Middleware(layer *store.Layer) proxy.Middleware { return } - defer q.updateMetrics(ctx, layer.Proxy, layer.Name, options) + defer q.updateMetrics(layer.Proxy, layer.Name, options) cookieName := q.getCookieName(layer.Name) @@ -217,7 +217,9 @@ func (q *Queue) refreshQueue(ctx context.Context, layerName store.LayerName, kee } } -func (q *Queue) updateMetrics(ctx context.Context, proxyName store.ProxyName, layerName store.LayerName, options *LayerOptions) { +func (q *Queue) updateMetrics(proxyName store.ProxyName, layerName store.LayerName, options *LayerOptions) { + ctx := context.Background() + // Update queue capacity metric metricQueueCapacity.With( prometheus.Labels{