guozhangwang commented on a change in pull request #11805:
URL: https://github.com/apache/kafka/pull/11805#discussion_r814937598
##########
File path:
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsProducer.java
##########
@@ -223,7 +224,9 @@ private double totalBlockedTime(final Producer<?, ?>
producer) {
+ getMetricValue(producer.metrics(), "txn-begin-time-ns-total")
+ getMetricValue(producer.metrics(),
"txn-send-offsets-time-ns-total")
+ getMetricValue(producer.metrics(), "txn-commit-time-ns-total")
- + getMetricValue(producer.metrics(), "txn-abort-time-ns-total");
+ + getMetricValue(producer.metrics(), "txn-abort-time-ns-total")
Review comment:
This is a meta question: since ns and ms measurement mechanisms differ,
if we simply sum them as `ns + ms * 10^6` it may not be accurate. Probably
worth checking in if the aggregated total blocked time does make sense.
##########
File path:
clients/src/main/java/org/apache/kafka/clients/producer/internals/KafkaProducerMetrics.java
##########
@@ -71,6 +74,10 @@ public KafkaProducerMetrics(Metrics metrics) {
TXN_ABORT,
"Total time producer has spent in abortTransaction in nanoseconds."
);
+ metadataWaitSensor = newLatencySensor(
+ METADATA_WAIT,
+ "Total time producer has spent waiting on metadata in "
Review comment:
This line seems not completed?
--
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]