tracers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitJaeger

func InitJaeger(ctx context.Context, service string) (opentracing.Tracer, io.Closer, error)

initJaeger returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.

func InitLightstep

func InitLightstep(service string, accessToken string) lightstep.Tracer

func Register

func Register(tracer *mocktracer.MockTracer, ss traces.SpanStore, r *mux.Router) error

Types

type HTTPMockTracer

type HTTPMockTracer struct {
	// contains filtered or unexported fields
}

HTTPMockTracer exposes mock tracer methods over HTTP

func (*HTTPMockTracer) FinishedSpans

func (h *HTTPMockTracer) FinishedSpans(w http.ResponseWriter, r *http.Request)

func (*HTTPMockTracer) Reset

func (h *HTTPMockTracer) Reset(w http.ResponseWriter, r *http.Request)

type Initializer

type Initializer func(ctx context.Context, name string) (opentracing.Tracer, io.Closer, error)

func InitializerFromCLI

func InitializerFromCLI(c *cli.Context, tracerName string) Initializer

type LightstepCloser

type LightstepCloser struct {
	// contains filtered or unexported fields
}

func NewLightstepCloser

func NewLightstepCloser(ctx context.Context, tracer lightstep.Tracer) LightstepCloser

func (LightstepCloser) Close

func (l LightstepCloser) Close() error

type LoggingTracer

type LoggingTracer struct{}

func (LoggingTracer) Extract

func (n LoggingTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)

Extract belongs to the Tracer interface.

func (LoggingTracer) Inject

func (n LoggingTracer) Inject(sp opentracing.SpanContext, format interface{}, carrier interface{}) error

Inject belongs to the Tracer interface.

func (LoggingTracer) StartSpan

func (n LoggingTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span

StartSpan belongs to the Tracer interface.

type NoopCloser

type NoopCloser struct{}

func (NoopCloser) Close

func (nc NoopCloser) Close() error

type Source

type Source struct{}

Source tracer delegates to the EventSource provided tracer

func NewRequestScopedUsingSources

func NewRequestScopedUsingSources() Source

func (Source) RequestScoped

func (s Source) RequestScoped(r *http.Request, es eventsources.EventSource) (opentracing.Tracer, io.Closer, error)

type TestSpan

type TestSpan struct {
	Span *mocktracer.MockSpan
	Tags map[string]interface{}
}

Jump to

Keyboard shortcuts

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