Jorge Esteban Quilcate Otoya created KAFKA-13742:
----------------------------------------------------
Summary: Quota byte-rate/request metrics are loaded only when at
least one quota is register
Key: KAFKA-13742
URL: https://issues.apache.org/jira/browse/KAFKA-13742
Project: Kafka
Issue Type: Bug
Components: core, metrics
Reporter: Jorge Esteban Quilcate Otoya
Quota metrics are loaded only when at least one quota is present:
* Metrics:
[https://github.com/apache/kafka/blob/0b9a8bac36f16b5397e9ec3a0441758e4b60a384/core/src/main/scala/kafka/server/ClientQuotaManager.scala#L552-L563]
* Reporting when quotas are enabled:
[https://github.com/apache/kafka/blob/0b9a8bac36f16b5397e9ec3a0441758e4b60a384/core/src/main/scala/kafka/server/ClientQuotaManager.scala#L249-L256]
* Quotas enabled: `def quotasEnabled: Boolean = quotaTypesEnabled !=
QuotaTypes.NoQuotas`
Even though throttling is specific for quotas, byte-rate/request per
user/client-id is a valid metric for any deployment.
The current workaround is to add _any_ quota, as this will enable metrics for
*all* client-id/users.
If these metrics are captured for all clients regardless of the quotas created,
it would be a better experience to have a config to opt-in into these metrics
instead of creating meaningless quotas just to get these metrics.
For threshold metrics, it makes sense to me to enable them only when quotas are
enabled.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)