Class ClientAuthenticationSensorKeyProducer

java.lang.Object
io.strimzi.kafka.oauth.client.metrics.ClientAuthenticationSensorKeyProducer
All Implemented Interfaces:
SensorKeyProducer

public class ClientAuthenticationSensorKeyProducer extends Object implements SensorKeyProducer
A SensorKeyProducer used for client authentication metrics
  • Constructor Details

    • ClientAuthenticationSensorKeyProducer

      public ClientAuthenticationSensorKeyProducer(String contextId, URI uri)
      Create a new instance
      Parameters:
      contextId - Context id (e.g. a config id or a label)
      uri - A token endpoint url
  • Method Details

    • successKey

      public SensorKey successKey()
      Generate a SensorKey for metrics about successful client authentication requests
      Specified by:
      successKey in interface SensorKeyProducer
      Returns:
      A sensor key
    • errorKey

      public SensorKey errorKey(Throwable e)
      Generate a SensorKey for metrics about failed client authentication requests
      Specified by:
      errorKey in interface SensorKeyProducer
      Parameters:
      e - The Throwable object to go with the failure
      Returns:
      A sensor key