tracing

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSpan

func ExtractSpan(ctx context.Context) (opentracing.SpanContext, error)

ExtractSpan retrieves an opentracing span context from the given context.Context The span context can be received directly (inside the context) or via an RPC call (encoded in binary format)

func FinishSpan

func FinishSpan(ctx context.Context, err error)

FinishSpan finishes a span retrieved from the given context and logs the error if it exists

func InjectSpan

func InjectSpan(ctx context.Context) (context.Context, error)

InjectSpan retrieves an opentrancing span from the current context and creates a new context with it encoded in binary format inside the propagatable context content

func LogError

func LogError(span opentracing.Span, message string)

LogError logs an error to an opentracing span

func StartSpan

func StartSpan(
	parentCtx context.Context,
	opName string,
	tags opentracing.Tags,
	reference ...opentracing.SpanContext,
) context.Context

StartSpan starts a new span with a given parent context, operation name, tags and optional parent span. It returns a context with the created span.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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