Class IntrospectHttpSensorKeyProducer

java.lang.Object
io.strimzi.kafka.oauth.metrics.AbstractSensorKeyProducer
io.strimzi.kafka.oauth.metrics.IntrospectHttpSensorKeyProducer
All Implemented Interfaces:
SensorKeyProducer

public class IntrospectHttpSensorKeyProducer extends AbstractSensorKeyProducer
A SensorKeyProducer used for introspect endpoint HTTP metrics
  • Constructor Details

    • IntrospectHttpSensorKeyProducer

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

    • successKey

      public SensorKey successKey()
      Generate a SensorKey for metrics about successful HTTP requests
      Returns:
      A sensor key
    • errorKey

      public SensorKey errorKey(Throwable e)
      Generate a SensorKey for metrics about failed HTTP requests
      Parameters:
      e - The Throwable object to go with the failure
      Returns:
      A sensor key