Back to / tracing / opentracing

package opentracing

Latest Go to latest
Published: Sep 17, 2019 | License: Apache-2.0 | Module:


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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier