Documentation ¶
Index ¶
- func NewRollupTracer(parent opentracing.Tracer) opentracing.Tracer
- type RollupTracer
- func (t *RollupTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
- func (t *RollupTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
- func (t *RollupTracer) StartRealSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
- func (t *RollupTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRollupTracer ¶
func NewRollupTracer(parent opentracing.Tracer) opentracing.Tracer
NewRollupTracer creates a RollupTracer wrapping the parent tracer provided
Types ¶
type RollupTracer ¶
type RollupTracer struct {
// contains filtered or unexported fields
}
RollupTracer wraps another tracer, and produces spans which roll up tags and durations to the nearest ancestor span from the parent tracer.
func (*RollupTracer) Extract ¶
func (t *RollupTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
Extract returns a SpanContext instance given `format` and `carrier`.
func (*RollupTracer) Inject ¶
func (t *RollupTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
Inject takes the `sm` SpanContext instance and injects it for propagation within `carrier`. The actual type of `carrier` depends on the value of `format`.
func (*RollupTracer) StartRealSpan ¶
func (t *RollupTracer) StartRealSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
StartRealSpan delegates to the parent tracer to start a "real" span. This creates a new rollup context.
func (*RollupTracer) StartSpan ¶
func (t *RollupTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
StartSpan creates, starts, and returns a new Span with the given `operationName` and incorporate the given StartSpanOption `opts`.