core: ensure all Server receiver names are consistent. (#16859)

This commit is contained in:
James Rasell
2023-04-12 14:03:07 +01:00
committed by GitHub
parent a0dad2e83f
commit 313ab8a681

View File

@@ -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)