Documentation ¶
Index ¶
- func ExtractSpan(ctx context.Context) (opentracing.SpanContext, error)
- func FinishSpan(ctx context.Context, err error)
- func InjectSpan(ctx context.Context) (context.Context, error)
- func LogError(span opentracing.Span, message string)
- func StartSpan(parentCtx context.Context, opName string, tags opentracing.Tags, ...) context.Context
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 ¶
FinishSpan finishes a span retrieved from the given context and logs the error if it exists
func InjectSpan ¶
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.