trace

package module
v0.0.0-...-634ad7c Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: GPL-3.0 Imports: 5 Imported by: 3

README

trace

Tracer written in Go, based on OpenTracing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trace

type Trace interface {
	SetGlobalTracer()
	StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
	Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
	Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
	Close() error
}

Trace interface def.

type TraceImpl

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

TraceImpl implement the Trace

func MakeTrace

func MakeTrace(cfg config.Configuration) (*TraceImpl, error)

MakeTrace return the point of TraceImpl

func (*TraceImpl) Close

func (t *TraceImpl) Close() error

Close the closer

func (*TraceImpl) Extract

func (t *TraceImpl) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)

Extract return the tracer's impl

func (*TraceImpl) Inject

func (t *TraceImpl) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error

Inject return the tracer's impl

func (*TraceImpl) SetGlobalTracer

func (t *TraceImpl) SetGlobalTracer()

SetGlobalTracer set the global tracer

func (*TraceImpl) StartSpan

func (t *TraceImpl) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span

StartSpan return the tracer's impl

Jump to

Keyboard shortcuts

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