opentracing

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(opts ...Option) plugin.Plugin

NewPlugin of opentracing

func SpanFromHeader

func SpanFromHeader(header http.Header, tracer opentracing.Tracer, name string, opts ...opentracing.StartSpanOption) (opentracing.Span, error)

SpanFromHeader 如果没在context中没有找到span,返回nil

func StartSpanFromHeader

func StartSpanFromHeader(header http.Header, tracer opentracing.Tracer, name string, opts ...opentracing.StartSpanOption) (opentracing.Span, error)

StartSpanFromHeader returns a new span with the given operation name and options. If a span is found in the header, it will be used as the parent of the resulting span.

Types

type Option

type Option func(o *Options)

Option of tace

func WithAutoStart

func WithAutoStart(auto bool) Option

WithAutoStart of opentracing

func WithResponseHandler

func WithResponseHandler(handler response.Handler) Option

WithResponseHandler of opentracing

func WithSkipperFunc

func WithSkipperFunc(skipperFunc request.SkipperFunc) Option

WithSkipperFunc of opentracing

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

WithTracer of opentracing

type Options

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

Options of opentracing

Jump to

Keyboard shortcuts

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