Class JwksRefresherMetrics
java.lang.Object
io.confluent.kafka.server.plugins.auth.oauth.JwksRefresherMetrics
Metrics for
JwksRefresher. Follows the AuthStoreMetrics pattern.
Metric group: "confluent-jwks-expedited-refresh-metrics".
Sensors are created lazily, keyed by (result, provider) where provider is the
JWKS endpoint hostname, and are never evicted. Cardinality is therefore bounded by the number of
configured OIDC provider hosts (not by request volume), which is small and stable, so the maps do
not grow unbounded over the broker's lifetime.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumReason an overlay cache entry was evicted.static enumOutcomes of a JWKS fetch attempt.static enumOutcomes of amaybeExpediteRefreshcall. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJwksRefresherMetrics(org.apache.kafka.common.metrics.Metrics metrics, Supplier<Integer> overlaySize) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidrecordFetch(JwksRefresherMetrics.FetchResult result, String provider) voidrecordFetchFailure(JwksFetchServiceClient.FetchFailureReason reason, String provider) Records a failed fetch tagged by itsJwksFetchServiceClient.FetchFailureReason.voidrecordFetchLatency(JwksRefresherMetrics.FetchResult result, String provider, long latencyMs) voidrecordRefresh(JwksRefresherMetrics.RefreshResult result, String provider) static voidrecordWiringFailure(org.apache.kafka.common.metrics.Metrics metrics) Records a failure to build theJwksRefresheritself (e.g.
-
Field Details
-
GROUP_NAME
- See Also:
-
-
Constructor Details
-
JwksRefresherMetrics
-
-
Method Details
-
recordRefresh
-
recordFetch
-
recordFetchFailure
Records a failed fetch tagged by itsJwksFetchServiceClient.FetchFailureReason. -
recordFetchLatency
public void recordFetchLatency(JwksRefresherMetrics.FetchResult result, String provider, long latencyMs) -
recordEviction
-
recordWiringFailure
public static void recordWiringFailure(org.apache.kafka.common.metrics.Metrics metrics) Records a failure to build theJwksRefresheritself (e.g. the misconfiguration caught aroundJwksRefresher.create). Static, and takesMetricsdirectly, because this failure happens before any refresher (and therefore any instance of this class) exists.
-