Documentation ¶
Index ¶
- type KVLogger
- type Span
- type Trace
- func (t *Trace) FromContext(ctx context.Context) tab.Spanner
- func (t *Trace) NewContext(ctx context.Context, span tab.Spanner) context.Context
- func (t *Trace) StartSpan(ctx context.Context, operationName string, opts ...interface{}) (context.Context, tab.Spanner)
- func (t *Trace) StartSpanWithRemoteParent(ctx context.Context, operationName string, carrier tab.Carrier, ...) (context.Context, tab.Spanner)
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
}
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span is the implementation of the OpenTracing Span abstraction
func (*Span) AddAttributes ¶
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) InternalSpan ¶
func (s *Span) InternalSpan() interface{}
InternalSpan returns the real implementation of the Span
type Trace ¶
type Trace struct{}
Trace is the implementation of the OpenTracing trace abstraction
func (*Trace) FromContext ¶
FromContext returns the `Span` previously associated with `ctx`, or `nil` if no such `Span` could be found.
func (*Trace) NewContext ¶
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