traceandtracego

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTracer

func AddTracer(svcName, spanName string,
	ctx context.Context,
	header http.Header,
	tracer opentracing.Tracer,
	tags map[string]string) context.Context

TracerWrapper tracer wrapper

func ClientDialOption

func ClientDialOption(parentTracer opentracing.Tracer) grpc.DialOption

RPC Client Dial Option

func InitJaeger

func InitJaeger(service string) (opentracing.Tracer, io.Closer)

初始化 Jaeger

func InitZipkin

func InitZipkin(service string) (opentracing.Tracer, reporter.Reporter)

初始化 zipkin

func ServerDialOption

func ServerDialOption(tracer opentracing.Tracer) grpc.ServerOption

RPC Server Dial Option

func WriteSubSpan

func WriteSubSpan(span opentracing.Span, subSpanName string)

write sub span

Types

type TextMapReader

type TextMapReader struct {
	metadata.MD
}

func (TextMapReader) ForeachKey

func (t TextMapReader) ForeachKey(handler func(key, val string) error) error

读取metadata中的span信息

type TextMapWriter

type TextMapWriter struct {
	metadata.MD
}

text map writer

func (TextMapWriter) Set

func (t TextMapWriter) Set(key, val string)

text map writer set

Jump to

Keyboard shortcuts

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