tracing

package
v0.0.0-...-eef0f43 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoError

func AutoError(span trace.Span, err error)

AutoError record error to span with caller function name. If you need to use custom function name, use ManualError instead.

func AutoSpan

func AutoSpan(ctx context.Context) (context.Context, trace.Span)

AutoSpan generates a span with caller function name. If you need to use custom function name, use ManualSpan instead.

func CtxFromHTTPHeader

func CtxFromHTTPHeader(ctx context.Context, h http.Header) context.Context

func CtxFromMap

func CtxFromMap(ctx context.Context, m map[string]string) context.Context

func ExtractIDs

func ExtractIDs(span trace.Span) (trace.TraceID, trace.SpanID)

func Init

func Init(cfg Config)

func InjectToHTTPHeader

func InjectToHTTPHeader(ctx context.Context, h http.Header)

func InjectToMap

func InjectToMap(ctx context.Context, m map[string]string)

func ManualError

func ManualError(span trace.Span, err error, name string)

ManualError record error to span with given name.

func ManualSpan

func ManualSpan(ctx context.Context, name string) (context.Context, trace.Span)

ManualSpan generates a span with given name.

func Shutdown

func Shutdown() error

Types

type Config

type Config struct {
	Enabled                 bool
	ServiceName             string
	Environment             string
	JaegerCollectorEndpoint string
}

Jump to

Keyboard shortcuts

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