tracing

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component

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

func Error(span opentracing.Span, err error)

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

func IDFromCtx

func IDFromCtx(ctx context.Context) []byte

IDFromCtx reads the tracing ID from the context.

func LoggerWith

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

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

func ResultLabel

func ResultLabel(span opentracing.Span, label string)

ResultLabel sets the operation result label on the span.

func StartSpanFromCtx

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