rmq
rmq copied to clipboard
Propagating Context
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?
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?
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).
For tracing please have a look at https://github.com/adjust/rmq/pull/136.
Closing as tracing as supported now.