Documentation ¶
Index ¶
- func ContextWithServant(ctx context.Context, servant string) context.Context
- func GetTracer(servant string) opentracing.Tracer
- func Init()
- func ServantFromContext(ctx context.Context) string
- func ZipkinClientFilter() tars.ClientFilterMiddleware
- func ZipkinHttpMiddleware(next http.Handler) http.Handler
- func ZipkinServerFilter() tars.ServerFilterMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithServant ¶
ContextWithServant add servant to context
func GetTracer ¶
func GetTracer(servant string) opentracing.Tracer
GetTracer gets tracer with the servant name
func Init ¶
func Init()
Init is used to init opentracing and zipkin, all configs are loaded from server config /tars/application/server add the following config samplerate=0.5 sampleaddress=http://127.0.0.1:9411 sampletype=http sampleencoding=json
func ServantFromContext ¶
ServantFromContext gets servant from context
func ZipkinClientFilter ¶
func ZipkinClientFilter() tars.ClientFilterMiddleware
ZipkinClientFilter gets tars client filter for zipkin opentracing.
func ZipkinHttpMiddleware ¶
ZipkinHttpMiddleware zipkin http server router middleware
func ZipkinServerFilter ¶
func ZipkinServerFilter() tars.ServerFilterMiddleware
ZipkinServerFilter gets tars server filter for zipkin opentracing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.