tidb: github.com/pingcap/tidb/util/tracing Index | Files

package tracing

import "github.com/pingcap/tidb/util/tracing"

Index

Package Files

util.go

Constants

const TiDBTrace = "tr"

TiDBTrace is set as Baggage on traces which are used for tidb tracing.

func ChildSpanFromContxt Uses

func ChildSpanFromContxt(ctx context.Context, opName string) (opentracing.Span, context.Context)

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 Uses

func NewRecordedTrace(opName string, callback func(sp basictracer.RawSpan)) opentracing.Span

NewRecordedTrace returns a Span which records directly via the specified callback.

func SpanFromContext Uses

func SpanFromContext(ctx context.Context) (sp opentracing.Span)

SpanFromContext returns the span obtained from the context or, if none is found, a new one started through tracer.

type CallbackRecorder Uses

type CallbackRecorder func(sp basictracer.RawSpan)

A CallbackRecorder immediately invokes itself on received trace spans.

func (CallbackRecorder) RecordSpan Uses

func (cr CallbackRecorder) RecordSpan(sp basictracer.RawSpan)

RecordSpan implements basictracer.SpanRecorder.

Package tracing imports 3 packages (graph) and is imported by 3 packages. Updated 2019-01-28. Refresh now. Tools for package owners.