span

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChildSpan

func NewChildSpan(ctx context.Context, tr *tracing.Tracer,
	spanName string) (context.Context, trace.Span)

NewChildSpan returns the context with a new Span situated as the child of the previous span

func PrepareRequest

func PrepareRequest(r *http.Request, tr *tracing.Tracer) (*http.Request, trace.Span)

PrepareRequest extracts trace information from the headers of the incoming request. It returns a pointer to the incoming request with the request context updated to include all span and tracing info. It also returns a span with the name "Request" that is meant to be a parent span for all child spans of this request.

func SetAttributes

func SetAttributes(tr *tracing.Tracer, span trace.Span, kvs ...label.KeyValue)

SetAttributes safely sets attributes on a span, unless they are in the omit list

Types

This section is empty.

Jump to

Keyboard shortcuts

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