Skip to content

Commit

Permalink
Turn on Lettuce latency metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-signal committed Jun 30, 2023
1 parent 457ecf1 commit 1049326
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import io.dropwizard.setup.Environment;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.lettuce.core.metrics.MicrometerCommandLatencyRecorder;
import io.lettuce.core.metrics.MicrometerOptions;
import io.lettuce.core.resource.ClientResources;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.binder.grpc.MetricCollectingServerInterceptor;
Expand Down Expand Up @@ -347,7 +349,10 @@ public void run(WhisperServerConfiguration config, Environment environment) thro
final VerificationSessions verificationSessions = new VerificationSessions(dynamoDbAsyncClient,
config.getDynamoDbTables().getVerificationSessions().getTableName(), clock);

ClientResources redisClientResources = ClientResources.builder().build();
final ClientResources redisClientResources = ClientResources.builder()
.commandLatencyRecorder(new MicrometerCommandLatencyRecorder(Metrics.globalRegistry, MicrometerOptions.builder().build()))
.build();

ConnectionEventLogger.logConnectionEvents(redisClientResources);

FaultTolerantRedisCluster cacheCluster = new FaultTolerantRedisCluster("main_cache_cluster", config.getCacheClusterConfiguration(), redisClientResources);
Expand Down

0 comments on commit 1049326

Please sign in to comment.