albertobastos commented on code in PR #15433: URL: https://github.com/apache/pinot/pull/15433#discussion_r2033320446
########## pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java: ########## @@ -559,6 +563,16 @@ public static Response getPinotQueryResponse(BrokerResponse brokerResponse) if (!exceptions.isEmpty()) { // set the header value as first exception error code value. queryErrorCodeHeaderValue = exceptions.get(0).getErrorCode(); + + // do log with the exception flagged with a particular marker for filtering + MDC.put("queryErrorCode", Integer.toString(queryErrorCodeHeaderValue)); + StringBuilder sb = new StringBuilder(); + sb.append("Query processing exceptions:"); + for (QueryProcessingException exception : exceptions) { + sb.append(" ").append(exception.toString()); + } Review Comment: Not strictly needed, but seemed a nice addition for easier formatting or additional routing depending on the use case. Not sure about the cost of adding/removing items to the MDC to determine if it is worth it. Anyway, title/description updated. ########## pinot-broker/pom.xml: ########## @@ -45,6 +45,10 @@ <groupId>org.apache.pinot</groupId> <artifactId>pinot-timeseries-planner</artifactId> </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + </dependency> Review Comment: You're right, the used classes belong to `slf4j-api`. I should explicitly add it to the module's `pom.xml` anyway, right? 89b7f5ef7f -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org