Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient creates a trace instrumented redis.Client. It takes context.Context as a first argument because clients can cheaply be created an discarded, and for a full trace you'll want to create a client that uses the provided context. For example:
req, _ := http.NewRequest() req = req.WithContext(ctx) ... client := NewClient(req.Context(), redisAddr) client.HMSet("results", keyValueDict)
func PerCommandTracer ¶
func PerCommandTracer(ctx context.Context) func(oldProcess func(cmd redis.Cmder) error) func(redis.Cmder) error
PerCommandTracer provides the instrumented WrapProcess function that you can attach to any client. It specifically takes in a context.Context as the first argument because you could be using the same client but wrapping it in a different context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.