rueidis icon indicating copy to clipboard operation
rueidis copied to clipboard

Feature Request: Add tracing for client-side `Do*` methods

Open timofurrer opened this issue 1 year ago • 2 comments

We are heavily using rueidisotel and have some flaky latency in our system. We see on the redis server side that request / response times are pretty constant. Now we are investigating where this variance is coming from.

Thus, it would be super useful to have tracing in rueidisotel that would only span across initiating a Do* call and handing the request over to the networking stack on client side. That is, without the entire round trip.

timofurrer avatar Jan 22 '24 11:01 timofurrer

Hi @timofurrer,

To log more detailed traces is hard. The only solution I have come up with is injecting hook functions into the ctx and invoking them at the various stages in the pipeline. But I am concerned about its overhead since we need to check if there are hooks in the ctx every time.

Flaky latencies could be caused by several factors, such as huge requests or responses. But mostly the cause could be your CPUs are busy with other things. If you have to make sure your CPUs are underutilized then you could try to increase the PipelineMultiplex option slightly (by 1 or 2) to see if the flaky is relieved.

rueian avatar Jan 22 '24 12:01 rueian

https://go.dev/blog/execution-traces-2024

This may serve as an alternative.

rueian avatar Mar 15 '24 14:03 rueian