Remove `shard` tag from Lettuce circuit breaker metrics

This commit is contained in:
Chris Eager 2024-04-22 18:17:45 -05:00 committed by Chris Eager
parent 2d314e5309
commit fba7686390
1 changed files with 1 additions and 3 deletions

View File

@ -56,7 +56,6 @@ public class LettuceShardCircuitBreaker implements NettyCustomizer {
private static final Logger logger = LoggerFactory.getLogger(ChannelCircuitBreakerHandler.class);
private static final String SHARD_TAG_NAME = "shard";
private static final String CLUSTER_TAG_NAME = "cluster";
private final String clusterName;
@ -82,8 +81,7 @@ public class LettuceShardCircuitBreaker implements NettyCustomizer {
// In some cases, like the default connection, the remote address includes the DNS hostname, which we want to exclude.
final String shardAddress = StringUtils.substringAfter(remoteAddress.toString(), "/");
breaker = CircuitBreaker.of("%s/%s-breaker".formatted(clusterName, shardAddress), circuitBreakerConfig);
CircuitBreakerUtil.registerMetrics(breaker, getClass(),
Tags.of(CLUSTER_TAG_NAME, clusterName, SHARD_TAG_NAME, shardAddress));
CircuitBreakerUtil.registerMetrics(breaker, getClass(), Tags.of(CLUSTER_TAG_NAME, clusterName));
}
@Override