diff --git a/nomad/rpc_rate_metrics.go b/nomad/rpc_rate_metrics.go index cf1917a43..1f55c87af 100644 --- a/nomad/rpc_rate_metrics.go +++ b/nomad/rpc_rate_metrics.go @@ -11,10 +11,10 @@ import ( // MeasureRPCRate increments the appropriate rate metric for this endpoint, // with a label from the identity -func (srv *Server) MeasureRPCRate(endpoint, op string, args structs.RequestWithIdentity) { +func (s *Server) MeasureRPCRate(endpoint, op string, args structs.RequestWithIdentity) { identity := args.GetIdentity() - if !srv.config.ACLEnabled || identity == nil || srv.config.DisableRPCRateMetricsLabels { + if !s.config.ACLEnabled || identity == nil || s.config.DisableRPCRateMetricsLabels { // If ACLs aren't enabled, we never have a sensible identity. // Or the administrator may have disabled the identity labels. metrics.IncrCounter([]string{"nomad", "rpc", endpoint, op}, 1)