tracing

package
v0.0.0-...-99e5d07 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChildSpan

func CreateChildSpan(ctx context.Context, name string) opentracing.Span

CreateChildSpan creates a new opentracing span adding tags for the span name and caller details. Returns a Span. User must call `defer sp.Finish()`

func Extract

func Extract(tracer opentracing.Tracer, r *http.Request) (opentracing.SpanContext, error)

func Init

func Init(service string) (opentracing.Tracer, io.Closer)

Init returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.

func Inject

func Inject(span opentracing.Span, request *http.Request) error

func NewTracedRequest

func NewTracedRequest(method string, url string, span opentracing.Span) (*http.Request, error)

NewTracedRequest generates a new traced HTTP request with opentracing headers injected into it

func OpenTracingMiddleware

func OpenTracingMiddleware(next http.Handler) http.Handler

func TraceFunction

func TraceFunction(ctx context.Context, fn interface{}, params ...interface{}) (result []reflect.Value)

TraceFunction wraps funtion with opentracing span adding tags for the function name and caller details

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL