You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jorge Esteban Quilcate Otoya (Jira)" <ji...@apache.org> on 2022/03/18 00:07:00 UTC
[jira] [Resolved] (KAFKA-13742) Quota byte-rate/request metrics are loaded only when at least one quota is register
[ https://issues.apache.org/jira/browse/KAFKA-13742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jorge Esteban Quilcate Otoya resolved KAFKA-13742.
--------------------------------------------------
Resolution: Not A Problem
Given that I got a better understanding of how quota metrics work (https://issues.apache.org/jira/browse/KAFKA-13744), I will close this one.
The only comment I may add is that there are no metrics at the moment to match client/users with topic/partitions. This information is only captured on the client-side as far as I know. I found quota metrics as a good proxy to get this mapping, though is still incomplete as the map to the topic is implicit at the moment on the broker-side.
Would be a nice addition to have this mapping available, but it should be discussed in another issue if there's interest in that.
> 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
> Priority: Major
> Labels: quotas
>
> 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)