Class AuthenticationMetrics

java.lang.Object
org.apache.pulsar.broker.authentication.metrics.AuthenticationMetrics

public class AuthenticationMetrics extends Object
  • Constructor Details

    • AuthenticationMetrics

      public AuthenticationMetrics()
  • Method Details

    • authenticateSuccess

      public static void authenticateSuccess(String providerName, String authMethod)
      Log authenticate success event to the authentication metrics.
      Parameters:
      providerName - The short class name of the provider
      authMethod - Authentication method name
    • authenticateFailure

      @Deprecated public static void authenticateFailure(String providerName, String authMethod, String reason)
      Log authenticate failure event to the authentication metrics. This method is deprecated due to the label "reason" is a potential infinite value.
      Parameters:
      providerName - The short class name of the provider
      authMethod - Authentication method name.
      reason - Failure reason.
    • authenticateFailure

      public static void authenticateFailure(String providerName, String authMethod, Enum<?> errorCode)
      Log authenticate failure event to the authentication metrics.
      Parameters:
      providerName - The short class name of the provider
      authMethod - Authentication method name.
      errorCode - Error code.