Skip to content

Commit

Permalink
Remove redundant Prometheus variable labels (#5008) (#5085)
Browse files Browse the repository at this point in the history
Remove redundant variable labels

Signed-off-by: Haywood Shannon <[email protected]>
(cherry picked from commit fb60fb6)
  • Loading branch information
haywoodsh authored Feb 13, 2024
1 parent 997981f commit 0f45ece
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/nginx-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f45ece

Please sign in to comment.