ccding commented on a change in pull request #11154: URL: https://github.com/apache/kafka/pull/11154#discussion_r680288120
########## File path: core/src/main/scala/kafka/log/UnifiedLog.scala ########## @@ -540,6 +542,13 @@ class Log(@volatile var logStartOffset: Long, } }, period = producerIdExpirationCheckIntervalMs, delay = producerIdExpirationCheckIntervalMs, unit = TimeUnit.MILLISECONDS) + // For compatibility, metrics are defined to be under `Log` class + override def metricName(name: String, tags: scala.collection.Map[String, String]): MetricName = { + val klass = getClass + val pkg = if (klass.getPackage == null) "" else klass.getPackage.getName Review comment: nit: it seems better to do the following? maybe a different variable name after the change. ```suggestion val klass = getClass.getPackage val pkg = if (klass == null) "" else klass.getName ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org