mcvsubbu commented on a change in pull request #3913: Adding the support for sampling logs URL: https://github.com/apache/incubator-pinot/pull/3913#discussion_r263045723
########## File path: pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java ########## @@ -292,17 +298,21 @@ public BrokerResponse handleRequest(JsonNode request, @Nullable RequesterIdentit LOGGER.debug("Broker Response: {}", brokerResponse); - // Table name might have been changed (with suffix _OFFLINE/_REALTIME appended) - LOGGER.info( - "RequestId:{}, table:{}, timeMs:{}, docs:{}/{}, entries:{}/{}, segments(queried/processed/matched):{}/{}/{} " - + "servers:{}/{}, groupLimitReached:{}, exceptions:{}, serverStats:{}, query:{}", requestId, - brokerRequest.getQuerySource().getTableName(), totalTimeMs, brokerResponse.getNumDocsScanned(), - brokerResponse.getTotalDocs(), brokerResponse.getNumEntriesScannedInFilter(), - brokerResponse.getNumEntriesScannedPostFilter(), brokerResponse.getNumSegmentsQueried(), - brokerResponse.getNumSegmentsProcessed(), brokerResponse.getNumSegmentsMatched(), - brokerResponse.getNumServersResponded(), brokerResponse.getNumServersQueried(), - brokerResponse.isNumGroupsLimitReached(), brokerResponse.getExceptionsSize(), serverStats.getServerStats(), - StringUtils.substring(query, 0, _queryLogLength)); + // Sampling the query log based on the sampling rate configuration + if(_queryLogSamplingRate > RANDOM.nextFloat()) { Review comment: maybe have other criteria which will force a log: * if number of exceptions > 0 * timeMs > 100 (say) * entries scanned post filter is high * num groups limit is reached I suggest adding a method shouldLog() ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org