tracer

package
v2.79.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSpanContextFromMessageHeaders added in v2.65.0

func ExtractSpanContextFromMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders) context.Context

func From added in v2.65.0

func From(ctx context.Context) trace.Tracer

func InitTracer

func InitTracer(flag, service string) func()

func InjectSpanContextToMessageHeaders added in v2.65.0

func InjectSpanContextToMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders)

func New added in v2.65.0

func New(name string) trace.Tracer

func NewJaegerProvider added in v2.65.0

func NewJaegerProvider(host, service string) (trace.Provider, func(), error)

func NewStdoutProvider added in v2.65.0

func NewStdoutProvider() (trace.Provider, error)

func NewTestingProvider added in v2.65.0

func NewTestingProvider(t *testing.T, name string) trace.Provider

func Propagators added in v2.65.0

func Propagators() propagation.Propagators

func SetGlobalTraceProvider added in v2.65.0

func SetGlobalTraceProvider(tp trace.Provider)

func SpanFromMessageHeaders added in v2.65.0

func SpanFromMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders, name string, attrs ...kv.KeyValue) (context.Context, trace.Span)

Types

type Cleanup added in v2.65.0

type Cleanup func()

func ConfigureProvider added in v2.65.0

func ConfigureProvider(cfg *Config) (pt trace.Provider, cl Cleanup, err error)

type Config added in v2.65.0

type Config struct {
	ExporterType    ExporterType
	ServiceName     string
	RuntimeProvider bool

	// Jaeger config
	JaegerHost string
}

type ExporterType added in v2.65.0

type ExporterType int
const (
	ExporterTypeNone ExporterType = iota
	ExporterTypeStdout
	ExporterTypeJaeger
)

type RuntimeProvider added in v2.65.0

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

func NewRuntimeProvider added in v2.65.0

func NewRuntimeProvider(root trace.Provider) *RuntimeProvider

func (*RuntimeProvider) Tracer added in v2.65.0

func (rp *RuntimeProvider) Tracer(name string) trace.Tracer

type RuntimeTracer added in v2.65.0

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

func (*RuntimeTracer) Start added in v2.65.0

func (rt *RuntimeTracer) Start(ctx context.Context, spanName string, opts ...trace.StartOption) (context.Context, trace.Span)

Start identical to original start span, but automatically add runtime information to the span

func (*RuntimeTracer) WithSpan added in v2.65.0

func (rt *RuntimeTracer) WithSpan(ctx context.Context, spanName string, fn func(ctx context.Context) error, opts ...trace.StartOption) error

WithSpan is identical to original start span, but automatically add runtime information to the span

Jump to

Keyboard shortcuts

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