trace

package
v0.0.0-...-cb950d2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchDriver = errors.New("no such driver")

Functions

func AddSpanIdGenerator

func AddSpanIdGenerator(generator *SpanIdGenerator)

func DeleteSpanIdGenerator

func DeleteSpanIdGenerator(key *SpanKey)

func Disable

func Disable()

func Driver

func Driver() types.Driver

func Enable

func Enable()

func GetIp

func GetIp() string

func Init

func Init(typ string, config map[string]interface{}) error

func IsEnabled

func IsEnabled() bool

func NewDefaultDriverImpl

func NewDefaultDriverImpl() types.Driver

func RegisterDriver

func RegisterDriver(typ string, driver types.Driver)

func RegisterTracerBuilder

func RegisterTracerBuilder(typ string, protocol types.Protocol, builder types.TracerBuilder)

func SpanFromContext

func SpanFromContext(ctx context.Context) types.Span

func Tracer

func Tracer(protocol types.Protocol) types.Tracer

Types

type IdGenerator

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

func IdGen

func IdGen() IdGenerator

func (IdGenerator) GenerateTraceId

func (idGen IdGenerator) GenerateTraceId() string

type SpanIdGenerator

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

A span ID generator that generate a span ID like 0.1, 0.1.1, 0.1.2 etc.

func GetSpanIdGenerator

func GetSpanIdGenerator(key *SpanKey) *SpanIdGenerator

func NewSpanIdGenerator

func NewSpanIdGenerator(traceId, spanId string) *SpanIdGenerator

func (*SpanIdGenerator) GenerateNextChildIndex

func (generator *SpanIdGenerator) GenerateNextChildIndex() string

type SpanKey

type SpanKey struct {
	TraceId string
	SpanId  string
}

func (*SpanKey) UniqueKey

func (spanKey *SpanKey) UniqueKey() string

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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