mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 00:38:02 +01:00
Standardize circuit breaker/retry names
This commit is contained in:
committed by
Jon Chambers
parent
8060d74899
commit
cd957e0347
@@ -45,7 +45,7 @@ public class FaultTolerantRedisClient {
|
||||
}
|
||||
|
||||
private static String getCircuitBreakerName(final String name) {
|
||||
return FaultTolerantRedisClient.class.getSimpleName() + "/" + name;
|
||||
return ResilienceUtil.name(FaultTolerantRedisClient.class, name);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
@@ -99,7 +99,9 @@ public class LettuceShardCircuitBreaker implements NettyCustomizer {
|
||||
// In some cases, like the default connection, the remote address includes the DNS hostname, which we want to exclude.
|
||||
shardAddress = StringUtils.substringAfter(remoteAddress.toString(), "/");
|
||||
|
||||
final String circuitBreakerName = "%s-%s/%s".formatted(LettuceShardCircuitBreaker.class.getSimpleName(), clusterName, shardAddress);
|
||||
final String circuitBreakerName =
|
||||
ResilienceUtil.name(LettuceShardCircuitBreaker.class, "%s/%s".formatted(clusterName, shardAddress));
|
||||
|
||||
final Map<String, String> tags = Map.of(
|
||||
CLUSTER_TAG_NAME, clusterName,
|
||||
SHARD_ADDRESS_TAG_NAME, shardAddress);
|
||||
|
||||
Reference in New Issue
Block a user