The code implementation of command latency monitoring using Letuce Redis client in Spring Boot MVC app didn't collecting any command latency event, only connection event recorded. Here's the log captured after the API that issue Redis command invoked,
Log Captured2023-10-15T15:43:06.116+07:00 INFO 30580 --- [xecutorLoop-3-2] c.m.redis.controller.Controller : Log Event: ConnectedEvent [/<host>:<port> -> /<host>:<port>]
2023-10-15T15:43:06.167+07:00 INFO 30580 --- [xecutorLoop-3-3] c.m.redis.controller.Controller : Log Event: ConnectionActivatedEvent [/<host>:<port> -> /<host>:<port>]
2023-10-15T15:43:06.303+07:00 INFO 30580 --- [xecutorLoop-3-4] c.m.redis.controller.Controller : Log Event: ConnectedEvent [/<host>:<port> -> /<host>:<port>]
2023-10-15T15:43:06.377+07:00 INFO 30580 --- [xecutorLoop-3-5] c.m.redis.controller.Controller : Log Event: ConnectionActivatedEvent [/<host>:<port> -> /<host>:<port>]
https://gist.github.com/varvay/a3caa2104709a2d7dfe868a682469d6f
The command latency event captured in the log
N/A
N/A
Based on my exploration also supported by response in the GitHub Ticket, Micrometer won't emit latency event to Lettuce event bus. As workaround, I use Lettuce DefaultCommandLatencyCollector
instead of MicrometerCommandLatencyRecorder