Version: v0.6.16 Latest Latest

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 8 Imported by: 8






This section is empty.


View Source
var (
	// String ...
	String = log.String


func CustomTag

func CustomTag(key string, val interface{}) opentracing.Tag

CustomTag ...

func ExtractTraceID added in v0.3.6

func ExtractTraceID(ctx context.Context) string

ExtractTraceID HTTP使用request.Context,不要使用错了

func FromIncomingContext

func FromIncomingContext(ctx context.Context) opentracing.StartSpanOption

FromIncomingContext ...

func HeaderExtractor

func HeaderExtractor(hdr http.Header) opentracing.StartSpanOption

HeaderExtractor ...

func HeaderInjector

func HeaderInjector(ctx context.Context, hdr http.Header) context.Context

HeaderInjector ...

func MetadataExtractor

func MetadataExtractor(md map[string][]string) opentracing.StartSpanOption

MetadataExtractor ...

func MetadataInjector

func MetadataInjector(ctx context.Context, md metadata.MD) context.Context

MetadataInjector ...

func SetGlobalTracer

func SetGlobalTracer(tracer opentracing.Tracer)

SetGlobalTracer ...

func SpanFromContext

func SpanFromContext(ctx context.Context) opentracing.Span

SpanFromContext ...

func StartSpanFromContext

func StartSpanFromContext(ctx context.Context, op string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)

StartSpanFromContext ...

func TagComponent

func TagComponent(component string) opentracing.Tag

TagComponent ...

func TagSpanKind

func TagSpanKind(kind string) opentracing.Tag

TagSpanKind ...

func TagSpanURL

func TagSpanURL(url string) opentracing.Tag

TagSpanURL ...


type HeaderReaderWriter added in v0.5.7

type HeaderReaderWriter http.Header

HeaderReaderWriter ...

func (HeaderReaderWriter) ForeachKey added in v0.5.7

func (w HeaderReaderWriter) ForeachKey(handler func(key, val string) error) error

ForeachKey ...

func (HeaderReaderWriter) Set added in v0.5.7

func (w HeaderReaderWriter) Set(key, val string)

Set ...

type MetadataReaderWriter

type MetadataReaderWriter struct {
	MD map[string][]string

MetadataReaderWriter ...

func (MetadataReaderWriter) ForeachKey

func (w MetadataReaderWriter) ForeachKey(handler func(key, val string) error) error

ForeachKey ...

func (MetadataReaderWriter) Set

func (w MetadataReaderWriter) Set(key, val string)

Set ...

type NullStartSpanOption

type NullStartSpanOption struct{}

NullStartSpanOption ...

func (NullStartSpanOption) Apply

func (sso NullStartSpanOption) Apply(options *opentracing.StartSpanOptions)

Apply ...


Path Synopsis

Jump to

Keyboard shortcuts

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