tracing

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TracingZipkinCollector    = "zipkin"
	TracingNamedPipeCollector = "namedPipe"
)

constant for tracing zipkin and pipe collectors

Variables

View Source
var TracerMap map[string]opentracing.Tracer

TracerMap tracer map key: caller name val: tracer

Functions

func GetTracer

func GetTracer(caller string) opentracing.Tracer

GetTracer get tracer

func Init

func Init() error

Init initialize the tracer

func NewCollector

func NewCollector(collectorType, target string) (zipkin.Collector, error)

NewCollector returns the collector object based on collector type

func Serialize

func Serialize(spans []*zipkincore.Span) *bytes.Buffer

Serialize serialize the zipkin spans

Types

type FileCollector

type FileCollector struct {
	Fd *os.File
}

FileCollector collects span to file

func (*FileCollector) Close

func (f *FileCollector) Close() error

Close close file collector

func (*FileCollector) Collect

func (f *FileCollector) Collect(s *zipkincore.Span) error

Collect serialize the zipkin spans and write into the file collector

type HeaderCarrier

type HeaderCarrier struct {
	Header map[string]string
}

HeaderCarrier http header carrier

func (*HeaderCarrier) ForeachKey

func (f *HeaderCarrier) ForeachKey(handler func(key, val string) error) error

ForeachKey to check the headers of zipkin

type RestClientHeaderWriter

type RestClientHeaderWriter rest.Request

RestClientHeaderWriter rest client header writer

func (RestClientHeaderWriter) Set

func (r RestClientHeaderWriter) Set(key, val string)

Set to set the header while call API

Jump to

Keyboard shortcuts

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