1717import com .linkedin .venice .stats .ClientType ;
1818import com .linkedin .venice .stats .TehutiUtils ;
1919import com .linkedin .venice .utils .LatencyUtils ;
20+ import com .linkedin .venice .utils .RedundantExceptionFilter ;
2021import com .linkedin .venice .utils .concurrent .VeniceConcurrentHashMap ;
2122import io .tehuti .metrics .MetricsRepository ;
2223import java .util .Map ;
3839 */
3940public class StatTrackingStoreClient <K , V > extends DelegatingStoreClient <K , V > {
4041 private static final Logger LOGGER = LogManager .getLogger (StatTrackingStoreClient .class );
42+ private static final RedundantExceptionFilter EXCEPTION_FILTER = new RedundantExceptionFilter ();
4143
4244 private static final String STAT_VENICE_CLIENT_NAME = "venice_client" ;
4345 private static final String STAT_SCHEMA_READER = "schema_reader" ;
@@ -246,6 +248,7 @@ public void compute(
246248
247249 private static void handleUnhealthyRequest (ClientStats clientStats , Throwable throwable , double latency ) {
248250 int httpStatus = getUnhealthyRequestHttpStatus (throwable );
251+ logException (clientStats .getName (), throwable );
249252 clientStats .emitUnhealthyRequestMetrics (latency , httpStatus );
250253 if (throwable instanceof VeniceClientHttpException ) {
251254 clientStats .recordHttpRequest (httpStatus );
@@ -268,6 +271,12 @@ private static void handleMetricTrackingForStreamingCallback(
268271 clientStats .recordSuccessDuplicateRequestKeyCount (duplicateEntryCnt );
269272 }
270273
274+ private static void logException (String storeName , Throwable throwable ) {
275+ if (!EXCEPTION_FILTER .isRedundantException (storeName , throwable )) {
276+ LOGGER .error ("Unhealthy request with error: " , throwable );
277+ }
278+ }
279+
271280 @ Override
272281 public ComputeRequestBuilder <K > compute () throws VeniceClientException {
273282 /**
0 commit comments