From 0f45ece008fd4f6d6203c358b3dc77a6d9582d0c Mon Sep 17 00:00:00 2001 From: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:55:19 +0000 Subject: [PATCH] Remove redundant Prometheus variable labels (#5008) (#5085) Remove redundant variable labels Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> (cherry picked from commit fb60fb663bef88e75f76c4af04dc6e07474e8dbb) --- cmd/nginx-ingress/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/nginx-ingress/main.go b/cmd/nginx-ingress/main.go index 8bc440e1c5..edf93f2995 100644 --- a/cmd/nginx-ingress/main.go +++ b/cmd/nginx-ingress/main.go @@ -699,10 +699,8 @@ func createPlusAndLatencyCollectors( serverZoneVariableLabels := []string{"resource_type", "resource_name", "resource_namespace"} streamServerZoneVariableLabels := []string{"resource_type", "resource_name", "resource_namespace"} - cacheZoneLabels := []string{"resource_type", "resource_name", "resource_namespace"} - workerPIDVariableLabels := []string{"resource_type", "resource_name", "resource_namespace"} variableLabelNames := nginxCollector.NewVariableLabelNames(upstreamServerVariableLabels, serverZoneVariableLabels, upstreamServerPeerVariableLabelNames, - streamUpstreamServerVariableLabels, streamServerZoneVariableLabels, streamUpstreamServerPeerVariableLabelNames, cacheZoneLabels, workerPIDVariableLabels) + streamUpstreamServerVariableLabels, streamServerZoneVariableLabels, streamUpstreamServerPeerVariableLabelNames, nil, nil) promlogConfig := &promlog.Config{} logger := promlog.New(promlogConfig) plusCollector = nginxCollector.NewNginxPlusCollector(plusClient, "nginx_ingress_nginxplus", variableLabelNames, constLabels, logger)