trace

package
v1.1.3-0...-a28cbea Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpFormat = iota
	GrpcFormat
)

Variables

View Source
var ErrInvalidCarrier = errors.New("invalid carrier")

Functions

func StartClientSpan

func StartClientSpan(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)

func StartServerSpan

func StartServerSpan(ctx context.Context, carrier Carrier, serviceName, operationName string) (
	context.Context, tracespec.Trace)

Types

type Carrier

type Carrier interface {
	Get(key string) string
	Set(key, value string)
}

func Extract

func Extract(format, carrier interface{}) (Carrier, error)

func Inject

func Inject(format, carrier interface{}) (Carrier, error)

type Propagator

type Propagator interface {
	Extract(carrier interface{}) (Carrier, error)
	Inject(carrier interface{}) (Carrier, error)
}

type Span

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

func (*Span) Finish

func (s *Span) Finish()

func (*Span) Follow

func (s *Span) Follow(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)

func (*Span) Fork

func (s *Span) Fork(ctx context.Context, serviceName, operationName string) (context.Context, tracespec.Trace)

func (*Span) SpanId

func (s *Span) SpanId() string

func (*Span) TraceId

func (s *Span) TraceId() string

func (*Span) Visit

func (s *Span) Visit(fn func(key, val string) bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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