Merge pull request #28767 from quaff

* pr/28767:
  LettuceMetricsAutoConfiguration should not build ClientResources

Closes gh-28767
pull/28779/head
Stephane Nicoll 3 years ago
commit cdc2851bc1

@ -36,6 +36,7 @@ import org.springframework.context.annotation.Configuration;
* Auto-configuration for Lettuce metrics.
*
* @author Antonin Arquey
* @author Yanming Zhou
* @since 2.6.0
*/
@Configuration(proxyBeanMethods = false)
@ -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));
}
}

Loading…
Cancel
Save