Documentation ¶
Overview ¶
Package redis implements a Redis client.
Index ¶
Constants ¶
const (
LabelKeyDBRedisNumCMD = label.Key("db.redis.num_cmd")
)
Semantic conventions for attribute keys for redis.
const (
// Nil reply returned by Redis when key does not exist.
Nil = redis.Nil
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client = redis.Client
Client is a Redis client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines.
type Option ¶
type Option interface {
Apply(*config)
}
Option applies a configuration to the given config.
func WithMeterProvider ¶
func WithMeterProvider(mp metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter. If none is specified, the global provider is used.
func WithOperationName ¶
WithOperationName specifies a operation name. If none is specified, the default operation name is used
func WithSpanNameFormatter ¶
func WithSpanNameFormatter(f SpanNameFormatter) Option
WithSpanNameFormatter specifies a formatter to used to format span names. If none is specified, the default SpanNameFormatter is used
func WithSpanNameFormatterPipeline ¶
func WithSpanNameFormatterPipeline(f SpanNameFormatterPipeline) Option
WithSpanNameFormatterPipeline specifies a formatter to used to format span names. If none is specified, the default SpanNameFormatterPipeline is used
func WithTracerProvider ¶
func WithTracerProvider(tp trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type OptionFunc ¶
type OptionFunc func(c *config)
OptionFunc provides a convenience wrapper for simple Options that can be represented as functions.
func (OptionFunc) Apply ¶
func (o OptionFunc) Apply(c *config)
Apply will apply the option to the config.
type SpanNameFormatter ¶
SpanNameFormatter creates a custom span name from the operation and cmder interface.
type SpanNameFormatterPipeline ¶
SpanNameFormatterPipeline creates a custom span name from the operation and cmder interface.