tracer

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TraceIDFromContext

func TraceIDFromContext(ctx context.Context) string

Types

type Instance

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

Instance generate the uuid for per goroutine, use to mark user requests.

func New

func New() *Instance

func (*Instance) Get

func (tracer *Instance) Get() (id string)

Get returns the uuid for this goroutine, it will generate a unique string if it doesn't exist'

func (*Instance) Release

func (tracer *Instance) Release()

Release remove the uuid of this goroutine

func (*Instance) Set

func (tracer *Instance) Set(id string)

Set sets the uuid for this goroutine

type OpenTracer

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

func NewOpenTracer

func NewOpenTracer(name string) *OpenTracer

func (*OpenTracer) Init

func (tracer *OpenTracer) Init()

func (*OpenTracer) WithJaeger

func (tracer *OpenTracer) WithJaeger(endpoint string) *OpenTracer

func (*OpenTracer) WithOption

func (tracer *OpenTracer) WithOption(options ...trace.TracerProviderOption) *OpenTracer

func (*OpenTracer) WithSampler

func (tracer *OpenTracer) WithSampler() *OpenTracer

Jump to

Keyboard shortcuts

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