Documentation ¶
Index ¶
Constants ¶
View Source
const TiDBTrace = "tr"
TiDBTrace is set as Baggage on traces which are used for tidb tracing.
Variables ¶
This section is empty.
Functions ¶
func ChildSpanFromContxt ¶
ChildSpanFromContxt return a non-nil span. If span can be got from ctx, then returned span is a child of such span. Otherwise, returned span is a noop span.
func NewRecordedTrace ¶
func NewRecordedTrace(opName string, callback func(sp basictracer.RawSpan)) opentracing.Span
NewRecordedTrace returns a Span which records directly via the specified callback.
func SpanFromContext ¶
SpanFromContext returns the span obtained from the context or, if none is found, a new one started through tracer.
Types ¶
type CallbackRecorder ¶
type CallbackRecorder func(sp basictracer.RawSpan)
A CallbackRecorder immediately invokes itself on received trace spans.
func (CallbackRecorder) RecordSpan ¶
func (cr CallbackRecorder) RecordSpan(sp basictracer.RawSpan)
RecordSpan implements basictracer.SpanRecorder.
Click to show internal directories.
Click to hide internal directories.