gaoran10 commented on code in PR #20030:
URL: https://github.com/apache/pulsar/pull/20030#discussion_r1164506608
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/metrics/AuthenticationMetrics.java:
##########
@@ -43,11 +46,36 @@ public static void authenticateSuccess(String providerName,
String authMethod) {
/**
* Log authenticate failure event to the authentication metrics.
+ *
+ * This method is deprecated due to the label "reason" is a potential
infinite value.
+ * @deprecated See {@link #authenticateFailure(String, String, ErrorCode)}
()}
+ * or {@link #authenticateFailure(String, String, AuthenticationException)}
+ *
* @param providerName The short class name of the provider
* @param authMethod Authentication method name.
* @param reason Failure reason.
*/
+ @Deprecated
public static void authenticateFailure(String providerName, String
authMethod, String reason) {
authFailuresMetrics.labels(providerName, authMethod, reason).inc();
}
+
+ public static void authenticateFailure(String providerName, String
authMethod,
+ AuthenticationException exception) {
Review Comment:
I add an abstract class `BaseAuthenticationException`. PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]