tracing

package
v0.0.0-...-5dc8409 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: Apache-2.0 Imports: 17 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 FasthttpHeaderCarrier

type FasthttpHeaderCarrier struct {
	*fasthttp.RequestHeader
}

FasthttpHeaderCarrier fast http heaer carrier

func (*FasthttpHeaderCarrier) ForeachKey

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

ForeachKey to check the headers of zipkin

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 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