trace

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 15 Imported by: 13

Documentation

Index

Constants

View Source
const (
	PluinDriverName = "PluginDriver"
)

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() api.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() api.Driver

func NewPluginDriverImpl added in v1.1.0

func NewPluginDriverImpl() api.Driver

func RegisterDriver

func RegisterDriver(typ string, driver api.Driver)

func RegisterTracerBuilder

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

func SpanFromContext

func SpanFromContext(ctx context.Context) api.Span

func Tracer

func Tracer(protocol types.ProtocolName) api.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

Jump to

Keyboard shortcuts

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