KAFKA-20612: Add DLQ related metrics to ShareGroupMetrics. [1/N]#22382
Merged
Conversation
apoorvmittal10
requested changes
May 27, 2026
Contributor
apoorvmittal10
left a comment
There was a problem hiding this comment.
Thanks for the PR, lgtm. Minor suggestions.
| public void recordDLQProduceFailed(String shareGroupId) { | ||
| dlqProduceFailedPerGroup.computeIfAbsent(shareGroupId, k -> metricsGroup.newMeter( | ||
| DEAD_LETTER_QUEUE_FAILED_PRODUCE_REQ_PER_SEC, | ||
| "dlq-produce", |
Contributor
There was a problem hiding this comment.
Will it be better to classify this as errors?
Suggested change
| "dlq-produce", | |
| "errors", |
| public void recordDLQRecordWrite(String shareGroupId, int count) { | ||
| dlqRecordCountPerGroup.computeIfAbsent(shareGroupId, k -> metricsGroup.newMeter( | ||
| DEAD_LETTER_QUEUE_RECORD_COUNT, | ||
| "dlq-records", |
Contributor
There was a problem hiding this comment.
Will it be better to classify this as requests?
Suggested change
| "dlq-records", | |
| "requests", |
| public void recordDLQProduce(String shareGroupId) { | ||
| dlqProduceTotalPerGroup.computeIfAbsent(shareGroupId, k -> metricsGroup.newMeter( | ||
| DEAD_LETTER_QUEUE_TOTAL_PRODUCE_REQ_PER_SEC, | ||
| "dlq-produce", |
Contributor
There was a problem hiding this comment.
Will it be better to classify this as requests?
Suggested change
| "dlq-produce", | |
| "requests", |
Comment on lines
-135
to
-136
| topicPartitionsFetchRatio.forEach((k, v) -> metricsGroup.removeMetric(TOPIC_PARTITIONS_FETCH_RATIO, Map.of("group", k))); | ||
| topicPartitionsAcquireTimeMs.forEach((k, v) -> metricsGroup.removeMetric(TOPIC_PARTITIONS_ACQUIRE_TIME_MS, Map.of("group", k))); |
Contributor
There was a problem hiding this comment.
Can you please also change the string "group" to GROUP_ID_TAG in other places in the file.
| private static final String DEAD_LETTER_QUEUE_RECORD_COUNT = "DeadLetterQueueRecordCount"; | ||
| private static final String DEAD_LETTER_QUEUE_TOTAL_PRODUCE_REQ_PER_SEC = "DeadLetterQueueTotalProduceRequestsPerSec"; | ||
| private static final String DEAD_LETTER_QUEUE_FAILED_PRODUCE_REQ_PER_SEC = "DeadLetterQueueFailedProduceRequestsPerSec"; | ||
| private static final String GROUP_ID_TAG = "group"; |
Contributor
There was a problem hiding this comment.
nit: Move the GROUP_ID_TAG and ACK_TYPE_TAG together for readability separated by a line from metrics defined together.
Collaborator
Author
|
@apoorvmittal10 Thanks for the quick review - inc comments |
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.
invoked by the share group DLQ manager.
Reviewers: Apoorv Mittal apoorvmittal10@gmail.com