Documentation ¶
Overview ¶
Package apmgoredis provides helpers for tracing github.com/go-redis/redis client operations as spans.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { redis.UniversalClient // Client() returns the wrapped *redis.Client, // or nil if a non-normal client is wrapped RedisClient() *redis.Client // ClusterClient returns the wrapped *redis.ClusterClient, // or nil if a non-cluster client is wrapped. Cluster() *redis.ClusterClient // Ring returns the wrapped *redis.Ring, // or nil if a non-ring client is wrapped. RingClient() *redis.Ring // WithContext returns a shallow copy of the client with // its context changed to ctx and will add instrumentation // with client.WrapProcess and client.WrapProcessPipeline // // To report commands as spans, ctx must contain a transaction or span. WithContext(ctx context.Context) Client }
Client is the interface returned by Wrap.
Client implements redis.UniversalClient
func Wrap ¶
func Wrap(client redis.UniversalClient) Client
Wrap wraps client such that executed commands are reported as spans to Elastic APM, using the client's associated context. A context-specific client may be obtained by using Client.WithContext.
Click to show internal directories.
Click to hide internal directories.