mqliang commented on a change in pull request #6590:
URL: https://github.com/apache/incubator-pinot/pull/6590#discussion_r582171755



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/transport/ServerChannels.java
##########
@@ -147,6 +148,9 @@ synchronized void sendRequest(InstanceRequest 
instanceRequest)
       _channel.writeAndFlush(Unpooled.wrappedBuffer(requestBytes), 
_channel.voidPromise());
       
_brokerMetrics.addMeteredGlobalValue(BrokerMeter.NETTY_CONNECTION_REQUESTS_SENT,
 1);
       
_brokerMetrics.addMeteredGlobalValue(BrokerMeter.NETTY_CONNECTION_BYTES_SENT, 
requestBytes.length);
+      String tableName = 
instanceRequest.getQuery().getQuerySource().getTableName();
+      String rawTableName = TableNameBuilder.extractRawTableName(tableName);
+      _brokerMetrics.addMeteredTableValue(rawTableName, 
BrokerMeter.REQUEST_SIZE, requestBytes.length);

Review comment:
       I am not sure if this will work:
   ```
   instanceRequest.getQuery().toString().length());
   ```
   where `instanceRequest.getQuery()` return a BrokerRequest which is a thrift 
object, I am not sure if `toString()` will return the original user query. 
   
   If we can not get the user's original query at netty layer (query has been 
converted as thrift object), the only option is add the metric at 
SingleConnectionBrokerRequestHandler.java L93-94




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to