tracing

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreLabelId is the context value key of the name of the span to be saved
	StoreLabelId = "span_save_id"

	// StoreLabelMeta is the context value key that together with StoreLabelId constitutes the retrieval key for saved spans in the span store
	// StartSaveSpan and ShiftSpanByKey
	StoreLabelMeta = "span_save_meta"
)

Variables

View Source
var (
	Closer io.Closer
)
View Source
var (
	// Enabled turns tracing on for the current swarm instance
	Enabled bool = false
)

Functions

func FinishSpans

func FinishSpans()

FinishSpans calls `Finish()` on all stored spans It should be called on instance shutdown

func Setup

func Setup(o Options)

func ShiftSpanByKey

func ShiftSpanByKey(k string) opentracing.Span

ShiftSpanByKey retrieves the span stored under the key of the string given as argument The span is then deleted from the store

func StartSaveSpan

func StartSaveSpan(ctx context.Context) context.Context

StartSaveSpan stores the span specified in the passed context for later retrieval The span object but be context value on the key StoreLabelId. It will be stored under the the following string key context.Value(StoreLabelId)|.|context.Value(StoreLabelMeta)

Types

type Options added in v0.5.5

type Options struct {
	Enabled  bool
	Endpoint string
	Name     string
}

Jump to

Keyboard shortcuts

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