trace

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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