opentracing

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVLogger added in v0.1.3

type KVLogger struct {
	Span *Span
}

func (*KVLogger) Debug added in v0.1.3

func (a *KVLogger) Debug(msg string, attributes ...tab.Attribute)

func (*KVLogger) Error added in v0.1.3

func (a *KVLogger) Error(err error, attributes ...tab.Attribute)

func (*KVLogger) Fatal added in v0.1.3

func (a *KVLogger) Fatal(msg string, attributes ...tab.Attribute)

func (*KVLogger) Info added in v0.1.3

func (a *KVLogger) Info(msg string, attributes ...tab.Attribute)

type Span

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

Span is the implementation of the OpenTracing Span abstraction

func (*Span) AddAttributes

func (s *Span) AddAttributes(attributes ...tab.Attribute)

AddAttributes a tags to the span.

If there is a pre-existing tag set for `key`, it is overwritten.

func (*Span) End

func (s *Span) End()

End sets the end timestamp and finalizes Span state.

With the exception of calls to Context() (which are always allowed), Finish() must be the last call made to any span instance, and to do otherwise leads to undefined behavior.

func (*Span) Inject

func (s *Span) Inject(carrier tab.Carrier) error

Inject span context into carrier

func (*Span) InternalSpan

func (s *Span) InternalSpan() interface{}

InternalSpan returns the real implementation of the Span

func (*Span) Logger

func (s *Span) Logger() tab.Logger

Logger returns a trace.Logger for the span

type Trace

type Trace struct{}

Trace is the implementation of the OpenTracing trace abstraction

func (*Trace) FromContext

func (t *Trace) FromContext(ctx context.Context) tab.Spanner

FromContext returns the `Span` previously associated with `ctx`, or `nil` if no such `Span` could be found.

func (*Trace) NewContext

func (t *Trace) NewContext(ctx context.Context, span tab.Spanner) context.Context

NewContext returns a new context with the given Span attached.

func (*Trace) StartSpan

func (t *Trace) StartSpan(ctx context.Context, operationName string, opts ...interface{}) (context.Context, tab.Spanner)

StartSpan starts and returns a Span with `operationName`, using any Span found within `ctx` as a ChildOfRef. If no such parent could be found, StartSpanFromContext creates a root (parentless) Span.

func (*Trace) StartSpanWithRemoteParent

func (t *Trace) StartSpanWithRemoteParent(ctx context.Context, operationName string, carrier tab.Carrier, opts ...interface{}) (context.Context, tab.Spanner)

StartSpanWithRemoteParent starts and returns a Span with `operationName`, using reference span as FollowsFrom

Jump to

Keyboard shortcuts

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