opentracing

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

Tracer represents a wrapper for OpenTracing that implements tracing.Tracer.

func NewTracer

func NewTracer(tracer opentracing.Tracer) *Tracer

NewTracer returns a new instance of Tracer.

func (*Tracer) ExtractHTTPHeaders

func (t *Tracer) ExtractHTTPHeaders(r *http.Request) (tracing.Span, context.Context)

ExtractHTTPHeaders reads the HTTP headers to derive incoming context.

func (*Tracer) InjectHTTPHeaders

func (t *Tracer) InjectHTTPHeaders(r *http.Request)

InjectHTTPHeaders adds the required HTTP headers to pass context between nodes.

func (*Tracer) StartSpanFromContext

func (t *Tracer) StartSpanFromContext(ctx context.Context, operationName string) (tracing.Span, context.Context)

StartSpanFromContext returns a new child span and context from a given context.

Jump to

Keyboard shortcuts

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