From f7fe6c2a87a4497c5860ab2348585778a3a7439e Mon Sep 17 00:00:00 2001 From: Guido Iaquinti Date: Wed, 13 Jun 2018 14:56:14 +0100 Subject: [PATCH] Attach server.Name label to client.rpc.failed --- agent/consul/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/consul/client.go b/agent/consul/client.go index f5aa434ee0..4dc1f33655 100644 --- a/agent/consul/client.go +++ b/agent/consul/client.go @@ -276,7 +276,7 @@ TRY: // Move off to another server, and see if we can retry. c.logger.Printf("[ERR] consul: %q RPC failed to server %s: %v", method, server.Addr, rpcErr) - metrics.IncrCounterWithLabels([]string{"client", "rpc", "failed"}, 1, []metrics.Label{{Name: "server", Value: server.ID}}) + metrics.IncrCounterWithLabels([]string{"client", "rpc", "failed"}, 1, []metrics.Label{{Name: "server", Value: server.Name}}) c.routers.NotifyFailedServer(server) if retry := canRetry(args, rpcErr); !retry { return rpcErr