jolshan commented on code in PR #13798: URL: https://github.com/apache/kafka/pull/13798#discussion_r1242724200
########## core/src/main/scala/kafka/server/AddPartitionsToTxnManager.scala: ########## @@ -47,13 +55,19 @@ class AddPartitionsToTxnManager(config: KafkaConfig, client: NetworkClient, time private val inflightNodes = mutable.HashSet[Node]() private val nodesToTransactions = mutable.Map[Node, TransactionDataAndCallbacks]() + private val metricsGroup = new KafkaMetricsGroup(this.getClass) + val verificationFailureRate = metricsGroup.newMeter("VerificationFailureRate", "failures", TimeUnit.SECONDS) + val verificationTimeMs = metricsGroup.newHistogram("VerificationTimeMs") Review Comment: Sorry if this is a bit confusing. But the plan was not to have the metrics on the request type and rather on the manager object. This is why we report the metrics even when we don't send the verification (AddPartitionsToTxn) request. We can use the AddPartitionsToTxn Verify requests to get the timing and error rates from the api. However, these metrics are intended to capture the full end to end handling of the verification. This means the timing will also include any queuing/waiting for sending to the coordinator and we can get errors rates when we don't send the request (ie, repeat produce request with the same producer id). They are meant to supplement the api metrics. -- 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