Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ActiveSpan opentracing.Span
ActiveSpan is global opentraing parent span, will be initialized in opentracing Serve function restclient use it to generate child span
View Source
var GlobalTracer *zipkin.Tracer
GlobalTracer is zipkin Tracer
View Source
var ZipkinSpan zipkin.Span
ZipkinSpan is span if the span-context that extract from incoming request header is not nil, ZipkinSpan will be child span of incoming else will be root span
Functions ¶
func InitGlobalTracer ¶
InitGlobalTracer is for setting Global Tracer. you must do the function in main() function like follow:
closer := InitGlobalTracer("your_service_name") defer closer.Close()
func InitZipkinTracer ¶ added in v0.4.0
InitZipkinTracer is for initilize zipkin global Tracer function
func Serve ¶
Serve is opentracing middleware function parameter operationName is a operaion name, usually named it service name
func ZipkinServe ¶ added in v0.4.0
Types ¶
Click to show internal directories.
Click to hide internal directories.