tracing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSpanContextFromRequest

func ExtractSpanContextFromRequest(r *http.Request) opentracing.SpanContext

func Initialize

func Initialize(service string, logger Logger) (io.Closer, error)

Initialize create an instance of Jaeger Tracer and sets it as GlobalTracer.

Types

type Info

type Info struct {
	TraceID   string
	SpanID    string
	ParentID  string
	IsSampled bool
}

type Logger

type Logger interface {
	Error(args ...interface{})
	Debugf(format string, args ...interface{})
}

type Span

type Span struct {
	opentracing.Span
}

func SpanFromContext

func SpanFromContext(ctx context.Context) *Span

func StartSpanFromContext

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

func StartSpanFromRequest

func StartSpanFromRequest(r *http.Request) (*Span, context.Context)

func (*Span) Info

func (s *Span) Info() *Info

func (*Span) Panic

func (s *Span) Panic(err interface{})

func (*Span) SetError

func (s *Span) SetError(err error)

func (*Span) SetHTTPResponseStatus

func (s *Span) SetHTTPResponseStatus(status int)

func (*Span) String

func (s *Span) String() string

Jump to

Keyboard shortcuts

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