-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Add Datadog Tracing Support for rueidis #3031
Comments
Hello! 👋 This sounds like a great addition, so please consider this proposal accepted. PRs are more than welcome, but if you want us to tackle the work feel free to reach out Datadog Support so we prioritize accordingly. |
@rarguelloF |
I have some concerns while working on Redis integration. Unlike go-redis, rueidis doesn't provide a way to inspect Client options once a Client is created. This suggests we should implement the integration using the trace library's NewClient consistently rather than using a WrapClient approach. I'd like to get thoughts on whether this approach makes sense. // go-redis
// Options returns read-only Options that were used to create the client.
func (c *Client) Options() *Options {
return c.opt
}
// rueidis
// Client is the redis client interface for both single redis instance and redis cluster. It should be created from the NewClient()
type Client interface {
CoreClient
DoCache(ctx context.Context, cmd Cacheable, ttl time.Duration) (resp RedisResult)
DoMultiCache(ctx context.Context, multi ...CacheableTTL) (resp []RedisResult)
DoStream(ctx context.Context, cmd Completed) RedisResultStream
DoMultiStream(ctx context.Context, multi ...Completed) MultiRedisResultStream
Dedicated(fn func(DedicatedClient) error) (err error)
Dedicate() (client DedicatedClient, cancel func())
Nodes() map[string]Client
} Another concern is about determining which Client type (Single, Sentinel, Cluster) will be created from given Options, which is needed for setting Redis span tags. While we can examine the related logic in rueidis' internal code, there are two main concerns:
|
The rueidis library currently supports OpenTelemetry tracing via rueidisotel and provides a hook mechanism through rueidishook.
I propose adding native Datadog tracing support to enhance observability for users of the rueidis Redis client.
The text was updated successfully, but these errors were encountered: