Documentation ¶
Index ¶
Constants ¶
View Source
const ( TraceTypeJaeger = "jaeger" TraceTypeZipkin = "zipkin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TraceContext ¶
type TraceContext struct {
TopSpan opentracing.Span
}
TraceContext trace
func NewTraceContext ¶
func NewTraceContext(name string, headers map[string][]string) *TraceContext
NewTraceContext new traceCtx
func (*TraceContext) SpanFinish ¶
func (ctx *TraceContext) SpanFinish(span opentracing.Span)
func (*TraceContext) SpanInject ¶
func (ctx *TraceContext) SpanInject(md metautils.NiceMD)
SpanInject 将span注入到request
func (*TraceContext) SpanStart ¶
func (ctx *TraceContext) SpanStart(name string) opentracing.Span
type TracerContext ¶
type TracerContext interface { SpanFinish(span opentracing.Span) // SpanStart 开启子span SpanStart(name string) opentracing.Span // SpanInject 注入请求 SpanInject(md metautils.NiceMD) }
TracerContext 链路
Click to show internal directories.
Click to hide internal directories.