Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TracingEnabledFlag is the CLI flag name to use to enable trace collections. TracingEnabledFlag = "tracing" // 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 ( TracingFlag = cli.BoolFlag{ Name: TracingEnabledFlag, Usage: "Enable tracing", } TracingEndpointFlag = cli.StringFlag{ Name: "tracing.endpoint", Usage: "Tracing endpoint", Value: "0.0.0.0:6831", } TracingSvcFlag = cli.StringFlag{ Name: "tracing.svc", Usage: "Tracing service name", Value: "swarm", } )
View Source
var (
Closer io.Closer
)
View Source
var ( // Enabled turns tracing on for the current swarm instance Enabled bool = false )
View Source
var Flags = []cli.Flag{ TracingFlag, TracingEndpointFlag, TracingSvcFlag, }
Flags holds all command-line flags required for tracing collection.
Functions ¶
func FinishSpans ¶
func FinishSpans()
FinishSpans calls `Finish()` on all stored spans It should be called on instance shutdown
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 ¶
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 ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.