jherico opened a new pull request #17401:
URL: https://github.com/apache/flink/pull/17401


   ## What is the purpose of the change
   
   * Fix the errors generated by the metrics code when reading from a Kafka 
topic that includes periods in the names. The filter for the metric tries to 
compare the topic name against the corresponding metric `topic` tag, but the 
metric tags execute a transform on the topic name that replaces any periods 
with underscores, so if you try to find the records-lag metric in via the 
changed function, it logs a WARN level log with an exception stack trace.
   
   ## Brief change log
   
     - Execute the required transformation in the `getRecordsLagMetric` function
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   Unfortunately while some of the tests in `KafkaSourceReaderTest` cover this 
code and changing the topic name in that class to `"Kafka.Source.Reader.Test"` 
even causes the issue, it doesn't actually cause the tests to fail.  Further, 
the `KafkaSourceReaderMetricsTest` doesn't have any coverage of the 
`getRecordsLagMetric` function at all, which is disappointing. 
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to