Varid Vaya
Varid Vaya

Reputation: 394

Redis Lettuce Client Command Latency Event Wasn't Retrieved in the subscriber

Command latency event wasn't retrieved in the subscriber

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 Captured
2023-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>]

Input Code

Input Code

https://gist.github.com/varvay/a3caa2104709a2d7dfe868a682469d6f

Expected behavior/code

The command latency event captured in the log

Environment

Possible Solution

N/A

Additional context

N/A

GitHub Ticket

GitHub Ticket

https://github.com/lettuce-io/lettuce-core/issues/2523

Upvotes: 0

Views: 311

Answers (1)

Varid Vaya
Varid Vaya

Reputation: 394

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

Upvotes: 0

Related Questions