Browse code

BM-14626 impr: Add service to ysnp authentication metric

Arnaud Aujon Chevallier authored on 12/04/2019 13:33:14
Showing 1 changed files
... ...
@@ -100,10 +100,10 @@ public class SaslauthdProtocol {
100 100
 
101 101
 		ByteBuffer response;
102 102
 		if (valid) {
103
-			registry.counter(idFactory.name("authCount", "status", "ok")).increment();
103
+			registry.counter(idFactory.name("authCount", "status", "ok", "service", service)).increment();
104 104
 			response = ByteBuffer.wrap(SASL_OK);
105 105
 		} else {
106
-			registry.counter(idFactory.name("authCount", "status", "failed")).increment();
106
+			registry.counter(idFactory.name("authCount", "status", "failed", "service", service)).increment();
107 107
 			response = ByteBuffer.wrap(SASL_FAILED);
108 108
 		}
109 109
 		channel.write(response);