Package io.strimzi.kafka.oauth.metrics
Class IntrospectValidationSensorKeyProducer
java.lang.Object
io.strimzi.kafka.oauth.metrics.AbstractSensorKeyProducer
io.strimzi.kafka.oauth.metrics.IntrospectValidationSensorKeyProducer
- All Implemented Interfaces:
SensorKeyProducer
A
SensorKeyProducer used for token validation metrics for a listener using an introspection endpoint-
Constructor Summary
ConstructorsConstructorDescriptionIntrospectValidationSensorKeyProducer(String contextId, String saslMechanism, URI uri) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionGenerate aSensorKeyfor metrics about failed token validation requestsGenerate aSensorKeyfor metrics about successful token validation requests
-
Constructor Details
-
IntrospectValidationSensorKeyProducer
Create a new instance- Parameters:
contextId- Context id (e.g. a config id or a label)saslMechanism- a mechanism through which the validator is used (e.g. OAUTHBEARER, PLAIN)uri- An introspection endpoint url
-
-
Method Details
-
successKey
Generate aSensorKeyfor metrics about successful token validation requests- Returns:
- A sensor key
-
errorKey
Generate aSensorKeyfor metrics about failed token validation requests- Parameters:
e- The Throwable object to go with the failure- Returns:
- A sensor key
-