tracing

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration

func Duration(k string, d time.Duration) log.Field

Duration returns a log field containing a human-readable representation of d.

func LogError

func LogError(ctx context.Context, err error, fields ...log.Field)

LogError logs an error to the span in ctx, if one is present. The span is also marked as an error.

func LogErrorS

func LogErrorS(s opentracing.Span, err error, fields ...log.Field)

LogErrorS logs an error to span and marks it as an error, if it is not nil.

func LogEvent

func LogEvent(ctx context.Context, ev string, msg string, fields ...log.Field)

LogEvent logs an event to the span in ctx, if one is present.

func LogEventS

func LogEventS(s opentracing.Span, ev string, msg string, fields ...log.Field)

LogEventS logs an event to span, if it is not nil.

func SetTag

func SetTag(ctx context.Context, k string, v interface{})

SetTag sets a tag on the span in ctx, if one is present.

func SetTagS

func SetTagS(s opentracing.Span, k string, v interface{})

SetTagS sets a tag on s, if it is not nil.

func StartChildOf

func StartChildOf(
	ctx context.Context,
	tr opentracing.Tracer,
	op string,
	opts ...opentracing.StartSpanOption,
) opentracing.Span

StartChildOf starts a new span as a child of the span in ctx, if any.

func StartFollowsFrom

func StartFollowsFrom(
	ctx context.Context,
	tr opentracing.Tracer,
	op string,
	opts ...opentracing.StartSpanOption,
) opentracing.Span

StartFollowsFrom starts a new span that follows from the span in ctx, if any.

func StartSpan

func StartSpan(
	tr opentracing.Tracer,
	op string,
	opts ...opentracing.StartSpanOption,
) opentracing.Span

StartSpan starts a new span using tr, or a NoopTracer if tr is nil.

func Time

func Time(k string, t time.Time) log.Field

Time returns a log field containing a human-readable representation of t.

func TypeName

func TypeName(k string, v interface{}) log.Field

TypeName returns a log field containing the name of v's type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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