Auto-configure Micrometer's Lettuce latency metrics

Add auto-configuration support to export Lettuce latency metrics.

See gh-27865
This commit is contained in:
Antonin ARQUEY
2021-09-03 14:34:34 +02:00
committed by Stephane Nicoll
parent 06720beb87
commit 190fea6faa
7 changed files with 142 additions and 1 deletions

View File

@@ -223,6 +223,7 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
attributes "embedded-mongo-version": versionConstraints["de.flapdoodle.embed:de.flapdoodle.embed.mongo"],
"jetty-version": versionConstraints["org.eclipse.jetty:jetty-server"],
"jooq-version": versionConstraints["org.jooq:jooq"],
"lettuce-version": versionConstraints["io.lettuce:lettuce-core"],
"spring-amqp-version": versionConstraints["org.springframework.amqp:spring-amqp"],
"spring-batch-version": versionConstraints["org.springframework.batch:spring-batch-core"],
"spring-boot-version": project.version,

View File

@@ -1068,6 +1068,14 @@ Long task timers require a separate metric name and can be stacked with a short
[[actuator.metrics.supported.redis]]
==== Redis Metrics
Auto-configuration will register a `MicrometerCommandLatencyRecorder` for the auto-configured `LettuceConnectionFactory`.
For more details refer to {lettuce-docs}#command.latency.metrics.micrometer[Micrometer Metrics] section of the Lettuce documentation.
[[actuator.metrics.registering-custom]]
=== Registering Custom Metrics
To register custom metrics, inject `MeterRegistry` into your component:

View File

@@ -105,3 +105,4 @@
:micrometer-concepts-docs: {micrometer-docs}/concepts
:micrometer-registry-docs: {micrometer-docs}/registry
:tomcat-docs: https://tomcat.apache.org/tomcat-9.0-doc
:lettuce-docs: https://lettuce.io/core/{lettuce-version}/reference/index.html