otel

package
v1.0.0-dev.196 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientRegister

func ClientRegister(ctx context.Context, client *redis.Client) error

ClientRegister registers a new otel client to redis client.

func ClusterRegister

func ClusterRegister(ctx context.Context, client *redis.ClusterClient) error

ClusterRegister registers a new otel client on redis cluster client.

func ConfigAdd

func ConfigAdd(path string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a otel client for redis.

func NewClient

func NewClient() (*Client, error)

NewClient returns a new otel client with default options.

func NewClientWithConfigPath

func NewClientWithConfigPath(path string) (*Client, error)

NewClientWithConfigPath returns a new otel client with options from config path.

func NewClientWithOptions

func NewClientWithOptions(options *Options) *Client

NewClientWithOptions returns a new otel client with options.

func (*Client) Register

func (d *Client) Register(ctx context.Context, client *redis.Client) error

Register registers this otel client to redis client.

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

Cluster represents a otel client for redis cluster client.

func NewCluster

func NewCluster() (*Cluster, error)

NewCluster returns otel client with default options.

func NewClusterWithConfigPath

func NewClusterWithConfigPath(path string) (*Cluster, error)

NewClusterWithConfigPath returns otel client with options from config path.

func NewClusterWithOptions

func NewClusterWithOptions(options *Options) *Cluster

NewClusterWithOptions returns otel client with options.

func (*Cluster) Register

func (d *Cluster) Register(ctx context.Context, client *redis.ClusterClient) error

Register registers this otel client on redis cluster client.

type Options

type Options struct {
	Enabled bool
}

Options represents otel for redis client options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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