Include Redis cluster and shard address in circuit breaker log

This commit is contained in:
Katherine 2025-07-07 12:12:44 -04:00 committed by GitHub
parent 18ef3da261
commit a87690d817
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ public class LettuceShardCircuitBreaker implements NettyCustomizer {
// RedisNoScriptException doesnt indicate a fault the breaker can protect // RedisNoScriptException doesnt indicate a fault the breaker can protect
if (throwable != null && !(throwable instanceof RedisNoScriptException)) { if (throwable != null && !(throwable instanceof RedisNoScriptException)) {
breaker.onError(durationNanos, TimeUnit.NANOSECONDS, throwable); breaker.onError(durationNanos, TimeUnit.NANOSECONDS, throwable);
logger.warn("Command completed with error", throwable); logger.warn("Command completed with error for: {}/{}", clusterName, shardAddress, throwable);
} else { } else {
breaker.onSuccess(durationNanos, TimeUnit.NANOSECONDS); breaker.onSuccess(durationNanos, TimeUnit.NANOSECONDS);
} }