tracing

package
v0.0.0-...-4a3586f Latest Latest
Warning

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

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

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 NewTracer

func NewTracer() opentracing.Tracer

NewTracer creates a new tracer.

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

func SpanFromContext(ctx context.Context) opentracing.Span

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.

Jump to

Keyboard shortcuts

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