DL1231 commented on code in PR #21726:
URL: https://github.com/apache/kafka/pull/21726#discussion_r2937797240


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchMetricsManager.java:
##########
@@ -130,7 +127,7 @@ void recordPartitionLag(TopicPartition tp, long lag) {
         String name = partitionRecordsLagMetricName(tp);
         maybeRecordDeprecatedPartitionLag(name, tp, lag);
 
-        Sensor recordsLag = new SensorBuilder(metrics, name, () -> 
mkMap(mkEntry("topic", tp.topic()), mkEntry("partition", 
String.valueOf(tp.partition()))))
+        Sensor recordsLag = new SensorBuilder(metrics, name, () -> 
Map.of("topic", tp.topic(), "partition", String.valueOf(tp.partition())))

Review Comment:
   Done. Reverted to mkMap and added a comment on the class Javadoc noting that 
mkMap is required here to preserve tag ordering for JMX MBean names.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to