rotel

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt interface {
	// contains filtered or unexported methods
}

Opt interface used for setting optional config properties.

func KeyFormatter

func KeyFormatter(fn func(key []byte) (string, error)) Opt

KeyFormatter formats a Record's key for use in a span's attributes, overriding the default of string(Record.Key).

This option can be used to parse binary data and return a canonical string representation. If the returned string is not valid UTF-8 or if the formatter returns an error, the key is not attached to the span.

func TracerProvider

func TracerProvider(provider trace.TracerProvider) Opt

TracerProvider takes a trace.TracerProvider and applies it to the Tracer. If none is specified, the global provider is used.

type Tracing

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

func NewTracing

func NewTracing(opts ...Opt) *Tracing

NewTracing returns a new Tracing that adds opentelemetry tracing to the client.

func (*Tracing) OnKVCall

func (t *Tracing) OnKVCall(ctx context.Context, table string, op client.Op, fn client.KvDo) (client.OpResponse, error)

Jump to

Keyboard shortcuts

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