Documentation ¶
Index ¶
- func BinaryToContext(tracer opentracing.Tracer, header map[string]string, operationName string, ...) context.Context
- func ContextToHTTP(ctx context.Context, tracer opentracing.Tracer, req *http.Request) (nReq *http.Request)
- func HTTPToContext(tracer opentracing.Tracer, req *http.Request, operationName string) context.Context
- func InitTraceAPIAddr(addr string)
- func KVPut(body []byte) ([]byte, error)
- func TraceClient(tracer opentracing.Tracer, operationName string, finishOnSucc bool) core.Plugin
- func TraceServer(tracer opentracing.Tracer, operationName string) core.Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryToContext ¶
func BinaryToContext(tracer opentracing.Tracer, header map[string]string, operationName string, l *logging.Logger) context.Context
for rpc server
func ContextToHTTP ¶
func ContextToHTTP(ctx context.Context, tracer opentracing.Tracer, req *http.Request) (nReq *http.Request)
ContextToHTTP returns an http RequestFunc that injects an OpenTracing Span found in `ctx` into the http headers. If no such Span can be found, the RequestFunc is a noop.
func HTTPToContext ¶
func HTTPToContext(tracer opentracing.Tracer, req *http.Request, operationName string) context.Context
HTTPToContext returns an http RequestFunc that tries to join with an OpenTracing trace found in `req` and starts a new Span called `operationName` accordingly. If no trace could be found in `req`, the Span will be a trace root. The Span is incorporated in the returned Context and can be retrieved with opentracing.SpanFromContext(ctx).
func InitTraceAPIAddr ¶
func InitTraceAPIAddr(addr string)
func TraceClient ¶
func TraceServer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.