rueidisotel

package
v0.0.0-...-c14f4f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClient

func WithClient(client rueidis.Client, opts ...Option) rueidis.Client

WithClient creates a new rueidis.Client with OpenTelemetry tracing enabled

Example (OpenTelemetry)
client, err := rueidis.NewClient(rueidis.ClientOption{InitAddress: []string{"127.0.0.1:6379"}})
if err != nil {
	panic(err)
}
client = WithClient(client)
defer client.Close()
Output:

Types

type Option

type Option func(o *otelclient)

Option is the Functional Options interface

func MetricAttrs

func MetricAttrs(attrs ...attribute.KeyValue) Option

MetricAttrs set additional attributes to append to each metric.

func TraceAttrs

func TraceAttrs(attrs ...attribute.KeyValue) Option

TraceAttrs set additional attributes to append to each trace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL