tracing

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component added in v0.6.0

func Component(span opentracing.Span, component string)

Component sets the 'component' tag according to the provided value.

func CtxWith

func CtxWith(parentCtx context.Context, operationName string,
	opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)

CtxWith creates a new span and attaches it to the context, it also sets the debug id of the logger and the span id and attaches the logger to the context.

func Error added in v0.6.0

func Error(span opentracing.Span, err error)

Error sets the 'error' and 'error.msg' tags according to the provided error.

func IDFromCtx added in v0.5.0

func IDFromCtx(ctx context.Context) []byte

IDFromCtx reads the tracing ID from the context.

func LoggerWith added in v0.7.0

func LoggerWith(ctx context.Context, logger log.Logger) log.Logger

LoggerWith attaches the trace ID if the context contains a span.

func ResultLabel added in v0.6.0

func ResultLabel(span opentracing.Span, label string)

ResultLabel sets the operation result label on the span.

func StartSpanFromCtx added in v0.6.0

func StartSpanFromCtx(ctx context.Context, operationName string,
	opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)

StartSpanFromCtx wraps opentracing.StartSpanFromContext for convenience.

Types

This section is empty.

Jump to

Keyboard shortcuts

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