rmq icon indicating copy to clipboard operation
rmq copied to clipboard

Propagating Context

Open natdm opened this issue 2 years ago • 2 comments

Looking in this file:

https://github.com/adjust/rmq/blob/master/redis_wrapper.go#L10-L74

Why is there logic that actively prevents context from being passed to the redis commands? Any issue with exposing additional logic that has all these functions, but just Ctx at the end of the name to pass context?

natdm avatar May 17 '22 17:05 natdm

This is because the RedisClient interface (https://github.com/adjust/rmq/blob/master/redis_client.go) was created at a time when the Redis library wasn't context aware. So we would need to update the interface, the implementations and callers.

What would we want to use the contexts for here, though?

wellle avatar Jun 02 '22 11:06 wellle

What would we want to use the contexts for here, though?

@wellle for me: I would like to trace Redis calls to better understand the application performance. (OpenTelemetry) Also, it would be great if rmq would have tracing built in (similar to the redis client).

LKaemmerling avatar Sep 02 '22 04:09 LKaemmerling

For tracing please have a look at https://github.com/adjust/rmq/pull/136.

wellle avatar Mar 17 '23 14:03 wellle

Closing as tracing as supported now.

wellle avatar Jan 17 '24 17:01 wellle