tracing

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MuxTagging added in v0.0.16

func MuxTagging(t Tracing) func(handler http.Handler) http.Handler

Types

type Config

type Config struct {
	Log *log.Logger
	Env []string
}

type Constructor

type Constructor func(config Config) (Tracing, error)

type Noop

type Noop struct{}

func (Noop) AttachTag

func (n Noop) AttachTag(_ context.Context, _ string, _ interface{})

func (Noop) CreateRootMux

func (n Noop) CreateRootMux() (*mux.Router, http.Handler)

func (Noop) DynamicFields

func (n Noop) DynamicFields() []log.DynamicFields

func (Noop) StartSpanFromContext added in v0.0.15

func (n Noop) StartSpanFromContext(ctx context.Context, _ SpanConfig, callback func(ctx context.Context) error) error

func (Noop) WrapRoundTrip

func (n Noop) WrapRoundTrip(rt http.RoundTripper) http.RoundTripper

type Registry

type Registry struct {
	Constructors map[string]Constructor
}

func (*Registry) New

func (r *Registry) New(name string, config Config) (Tracing, error)

type SpanConfig added in v0.0.15

type SpanConfig struct {
	OperationName string
}

type Tracing

type Tracing interface {
	WrapRoundTrip(rt http.RoundTripper) http.RoundTripper
	AttachTag(ctx context.Context, key string, value interface{})
	DynamicFields() []log.DynamicFields
	CreateRootMux() (*mux.Router, http.Handler)
	StartSpanFromContext(ctx context.Context, cfg SpanConfig, callback func(ctx context.Context) error) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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