Documentation ¶
Index ¶
- func CreateSpan(ctx context.Context, spanName string, tags *map[string]interface{}) (opentracing.Span, context.Context)
- func CreateSpanFromClientContext(r *http.Request, spanName string, tags *map[string]interface{}) (opentracing.Span, context.Context)
- func ExtractFromCarrier(ctx context.Context, carrier opentracing.TextMapCarrier, spanName string, ...) (opentracing.Span, context.Context)
- func FlushCollector()
- func GetGlobalTracer() opentracing.Tracer
- func GotKitEndpointMiddleWare(operationName string) endpoint.Middleware
- func HTTPMiddleware(operationName string, next http.Handler) http.Handler
- func InjectIntoCarrier(ctx context.Context) opentracing.TextMapCarrier
- func InjectSpan(r *http.Request) *http.Request
- func SetGlobalTracer(apiName string, zipkinURL string) error
- func SetSpanError(span opentracing.Span, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSpan ¶
func CreateSpan(ctx context.Context, spanName string, tags *map[string]interface{}) (opentracing.Span, context.Context)
CreateSpan ...
func CreateSpanFromClientContext ¶
func CreateSpanFromClientContext(r *http.Request, spanName string, tags *map[string]interface{}) (opentracing.Span, context.Context)
CreateSpanFromClientContext ...
func ExtractFromCarrier ¶
func ExtractFromCarrier(ctx context.Context, carrier opentracing.TextMapCarrier, spanName string, tags *map[string]interface{}) (opentracing.Span, context.Context)
ExtractFromCarrier returns a span with context passed by the carrier ctx should not already have span in it
func FlushCollector ¶
func FlushCollector()
func GotKitEndpointMiddleWare ¶ added in v0.2.0
func GotKitEndpointMiddleWare(operationName string) endpoint.Middleware
GotKitEndpointMiddleWare returns a gokit.Middleware which change the behavior of a gokit.endpoint it had tracing capability
func HTTPMiddleware ¶
HTTPMiddleware returns a Middleware that injects an OpenTracing Span found in context into the HTTP Headers.
func InjectIntoCarrier ¶
func InjectIntoCarrier(ctx context.Context) opentracing.TextMapCarrier
InjectIntoCarrier returns a textMapCarrier, basically a map[string]string,
which can be used to transmit a span context to another service with ExtractFromCarrier
func SetGlobalTracer ¶
SetGlobalTracer ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.