Open
Conversation
gitlw
reviewed
Mar 17, 2021
There was a problem hiding this comment.
Since the clientMetric.config may have a null quota field, but the quota's bound field should always be available, can we simply check if the clientclientMetric.config.quota field is null or not?
We should always report even if its value is 0. Also, we shouldn't worry about the isNaN case.
Author
There was a problem hiding this comment.
I think you're right on 0. Fixed it.
But I think NaN is a safety check here so I still kept it.
|
Thanks for the PR @lmr3796 |
Author
|
@gitlw I've also added utilization rate |
5ee8da1 to
8039f6b
Compare
gitlw
approved these changes
Mar 30, 2021
194596b to
0d36932
Compare
0d36932 to
ecc1526
Compare
This patch adds QuotaBound sensor and QuotaUtilization sensor, in addition to the existing byte-rate & throttle-count sensors. The QuotaBound sensor records the value of of `org.apache.kafka.common.metrics.Quota#bound` if it exists. This process happens on the `kafka.server.ClientQuotaManager#recordAndGetThrottleTimeMs` code path, where quota check actually takes place. TICKET = N/A LI_DESCRIPTION = LIKAFKA-35289 EXIT_CRITERIA = When upstream implement similar sensors
ecc1526 to
51cf430
Compare
andrewchoi5
approved these changes
Apr 22, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds QuotaBound sensor and QuotaUtilization sensor, in
addition to the existing byte-rate & throttle-count sensors.
The QuotaBound sensor records the value of of
org.apache.kafka.common.metrics.Quota#boundif it exists.This process happens on the
kafka.server.ClientQuotaManager#recordAndGetThrottleTimeMscode path,where quota check actually takes place.
TICKET = N/A
LI_DESCRIPTION = LIKAFKA-35289
EXIT_CRITERIA = When upstream implement similar sensors