tracing

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, s zipkin.Span) context.Context

NewContext 将Span写入context

func NewContextFromSpanContext

func NewContextFromSpanContext(ctx context.Context, spanContext *model.SpanContext) context.Context

NewContextFromSpanContext 将SpanContext写入context

func NewZapReporter

func NewZapReporter() reporter.Reporter

NewReporter 构造函数

func SpanContextFromContext

func SpanContextFromContext(ctx context.Context) *model.SpanContext

SpanContextFromContext 从context中获取SpanContext

func SpanFromContext

func SpanFromContext(ctx context.Context) zipkin.Span

SpanFromContext 从context中获取Span

Types

type Tracer

type Tracer struct {
	opentracing.Tracer
}

Tracer 跟踪类

func New

func New(reporter reporter.Reporter) *Tracer

New 构造函数

type ZapReporter

type ZapReporter struct {
	*log.ZapLogger
}

func (*ZapReporter) Close

func (*ZapReporter) Close() error

Close 实现Reporter接口

func (*ZapReporter) Send

func (r *ZapReporter) Send(s model.SpanModel)

Send 实现Reporter接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL