github.com/go-redis/redis

github.com/go-redis/redis

Redis client for Go.

Wrap V7 client

Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	redis "github.com/go-redis/redis/v7"
	trace "gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis.v7"
)
func() (client *redis.Client) {
	client = {{ . }}
	trace.WrapClient(client)
	return
}()

Wrap V8 client

Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	redis "github.com/go-redis/redis/v8"
	trace "gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis.v8"
)
func() (client *redis.Client) {
	client = {{ . }}
	trace.WrapClient(client)
	return
}()

Wrap V9 client

Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	redis "github.com/redis/go-redis/v9"
	trace "gopkg.in/DataDog/dd-trace-go.v1/contrib/redis/go-redis.v9"
)
func() (client *redis.Client) {
	client = {{ . }}
	trace.WrapClient(client)
	return
}()