berty: berty.tech/berty/go/internal/tracer Index | Files

package tracer

import "berty.tech/berty/go/internal/tracer"

Index

Package Files

bertytypes_header.go runtime.go testing.go tracer.go

func ExtractSpanContextFromMessageHeaders Uses

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

func From Uses

func From(ctx context.Context) trace.Tracer

func InitTracer Uses

func InitTracer(flag, service string) func()

func InjectSpanContextToMessageHeaders Uses

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

func New Uses

func New(name string) trace.Tracer

func NewJaegerProvider Uses

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

func NewStdoutProvider Uses

func NewStdoutProvider() (trace.Provider, error)

func NewTestingProvider Uses

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

func Propagators Uses

func Propagators() propagation.Propagators

func SetGlobalTraceProvider Uses

func SetGlobalTraceProvider(tp trace.Provider)

func SpanFromMessageHeaders Uses

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

type Cleanup Uses

type Cleanup func()

func ConfigureProvider Uses

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

type Config Uses

type Config struct {
    ExporterType    ExporterType
    ServiceName     string
    RuntimeProvider bool

    // Jaeger config
    JaegerHost string
}

type ExporterType Uses

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

type RuntimeProvider Uses

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

func NewRuntimeProvider Uses

func NewRuntimeProvider(root trace.Provider) *RuntimeProvider

func (*RuntimeProvider) Tracer Uses

func (rp *RuntimeProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer

type RuntimeTracer Uses

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

func (*RuntimeTracer) Start Uses

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 Uses

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

Package tracer imports 16 packages (graph). Updated 2020-12-24. Refresh now. Tools for package owners.