Skip to content

Commit

Permalink
BACKPORT: plugin: Remove client_addr metrics label (#815)
Browse files Browse the repository at this point in the history
It's unnecessarily high-cardinality and never used.

Ref https://neondb.slack.com/archives/C03TN5G758R/p1708344983594829
  • Loading branch information
sharnoff committed Feb 20, 2024
1 parent b961dc8 commit a82f03b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/plugin/prommetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (p *AutoscaleEnforcer) makePrometheusRegistry() *prometheus.Registry {
Name: "autoscaling_plugin_resource_requests_total",
Help: "Number of resource requests received by the scheduler plugin",
},
[]string{"client_addr", "code"},
[]string{"code"},
)),
validResourceRequests: util.RegisterMetric(reg, prometheus.NewCounterVec(
prometheus.CounterOpts{
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (e *AutoscaleEnforcer) startPermitHandler(ctx context.Context, logger *zap.

var finalStatus int
defer func() {
e.metrics.resourceRequests.WithLabelValues(r.RemoteAddr, strconv.Itoa(finalStatus)).Inc()
e.metrics.resourceRequests.WithLabelValues(strconv.Itoa(finalStatus)).Inc()
}()

// Catch any potential panics and report them as 500s
Expand Down

0 comments on commit a82f03b

Please sign in to comment.