tracing

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentSpan

func CurrentSpan() opentracing.Span

Returns the current span, or nil, if no span is currently set in local storage.

func Execute

func Execute(op string, r *http.Request, client *http.Client) (*http.Response, error)

func NewPropagatingRoundTripper added in v1.4.3

func NewPropagatingRoundTripper(rt http.RoundTripper) http.RoundTripper

func TraceChild

func TraceChild(op string, fn func(span opentracing.Span) error) (err error)

Runs an operation and traces it with the given name. This will create a new child span if some span is currently active.

func TraceOrCreate

func TraceOrCreate(op string, fn func(span opentracing.Span) error) (err error)

Runs an operation and traces it with the given name. This will create a new span if no span is currently active.

func WithSpan

func WithSpan(span opentracing.Span, fn func())

Runs the given function with the provided span set in local storage for the duration of function call. This method will not call 'Finish()' on the span

func WithSpanPropagation added in v1.4.3

func WithSpanPropagation(client *http.Client) *http.Client

Returns a new http.Client that has automatic propagation of zipkin trace ids enabled.

Types

type Middleware

type Middleware func(http.Handler) http.Handler

func Tracing

func Tracing(service string, op string) Middleware

Returns a middleware that adds tracing to an http handler. This will create a new and empty local storage for the current go routine to propagate the tracing context.

Jump to

Keyboard shortcuts

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