Skip to content

Commit

Permalink
LettuceMetricsAutoConfiguration should not build ClientResources inst…
Browse files Browse the repository at this point in the history
…ance

Fix:
i.l.c.r.DefaultClientResources WARN io.lettuce.core.resource.DefaultClientResources was not shut down properly, shutdown() was not called before it's garbage-collected. Call shutdown() or shutdown(long,long,TimeUnit)
  • Loading branch information
quaff committed Nov 22, 2021
1 parent 490ec89 commit a5a955e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -36,6 +36,7 @@
* Auto-configuration for Lettuce metrics.
*
* @author Antonin Arquey
* @author Yanming Zhou
* @since 2.6.0
*/
@Configuration(proxyBeanMethods = false)
Expand All @@ -48,8 +49,7 @@ public class LettuceMetricsAutoConfiguration {
@Bean
public ClientResourcesBuilderCustomizer lettuceMetrics(MeterRegistry meterRegistry) {
MicrometerOptions options = MicrometerOptions.builder().histogram(true).build();
return (client) -> client.commandLatencyRecorder(new MicrometerCommandLatencyRecorder(meterRegistry, options))
.build();
return (client) -> client.commandLatencyRecorder(new MicrometerCommandLatencyRecorder(meterRegistry, options));
}

}

0 comments on commit a5a955e

Please sign in to comment.