SAMZA-2295 : records-lag based topic metrics not working for topics with periods (dot, '.') in them - #1131
Merged
Conversation
(messages-behind-high-watermark and high-watermark) are calculated from kafka's "records-lag" consumer metric. In version 1.1 or so, when metrics moved from including the topic name in the metric name to using tags, they added a replacement of period to underscore. See commit : apache/kafka@5d81639#diff-b45245913eaae46aa847d2615d62cde0R1331
mynameborat
approved these changes
Aug 7, 2019
mynameborat
left a comment
Contributor
There was a problem hiding this comment.
Thanks for fixing this :)
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.
Fix for topic lag metrics where topic contains period (.)
messages-behind-high-watermarkandhigh-watermarkare calculated from kafka'srecords-lagconsumer metric. In version 1.1 or so, when metrics moved from including the topic name in the metric name to using tags, they added a replacement of period to underscore. See commit :apache/kafka@5d81639#diff-b45245913eaae46aa847d2615d62cde0R1331
When Samza refactored to match this, the same replacement was not made, so the lookup of the "records-lag" metric in KafkaConsumerProxy fails to find a match.
The related commit on Samza is here:
01c0605#diff-b56db493dfdd2fd2d471f6df342fe661R400
The fix is a simple replacement added to the line above.