Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateTrace ¶
func AnnotateTrace()
AnnotateTrace adds an annotation to the golang executation tracer by calling a no-op cgo function.
func Disable ¶
func Disable() func()
Disable changes the environment so that all newly created tracers are trivial (i.e. noop tracers). This is a crutch to turn off tracing during benchmarks until future iterations come with a tunable probabilistic tracing setting. Concurrent calls are not safe. Prescribed use is:
func BenchmarkSomething(b *testing.B) { defer tracing.Disable()() // note the double ()() }
func NilSpan ¶
func NilSpan() opentracing.Span
NilSpan returns a Span for which all methods are noops.
func SetTestTracing ¶
func SetTestTracing()
SetTestTracing sets up subsequently created tracers returned by NewTracer() so that they record their traces to stderr. Not to be called concurrently with any tracer operations; the right place is init() in main_test.go.
func SpanFromContext ¶
SpanFromContext wraps opentracing.SpanFromContext so that the returned Span is never nil (instead of a nil Span, a noop Span is returned).
Types ¶
This section is empty.