opentracing

package
v0.0.0-...-1a196e1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	URL     string
	Options []zipkin.HTTPOption
	Client  zipkin.Collector
}

Collector 呈現了一個追蹤器內的收集器。

type Recorder

type Recorder struct {
	Debug       bool
	Host        string
	ServiceName string
	Options     []zipkin.RecorderOption
	Client      zipkin.SpanRecorder
}

Recorder 呈現了一個追蹤器內的記錄器。

type Tracer

type Tracer struct {
	Collector Collector
	Recorder  Recorder
	Client    opentracing.Tracer
}

Tracer 呈現了一個追蹤器的實體。

func NewTracer

func NewTracer(t Tracer) (*Tracer, error)

NewTracer 會接收一個只有設定的追蹤器建構體,並以此來建立一個新的、可用實體追蹤器。

func (*Tracer) ClientInterceptor

func (t *Tracer) ClientInterceptor() grpc.UnaryClientInterceptor

ClientInterceptor 會回傳一個可供 gRPC 中 Dial 函式使用的 Interceptor。

func (*Tracer) Extract

func (t *Tracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)

Extract 會解開一個追蹤週期,並回傳其資料。

func (*Tracer) Inject

func (t *Tracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error

Inject 會在目前的追蹤週期中插入新的內容以利於傳遞到其他地方。

func (*Tracer) ServerInterceptor

func (t *Tracer) ServerInterceptor() grpc.UnaryServerInterceptor

ServerInterceptor 會回傳一個可供 gRPC 中 NewServer 函式使用的 Interceptor。

func (*Tracer) StartChildSpan

func (t *Tracer) StartChildSpan(operationName string, parent opentracing.Span) opentracing.Span

StartChildSpan 會接收一個父追蹤週期,並且建立一個子追蹤週期。

func (*Tracer) StartSpan

func (t *Tracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span

StartSpan 會建立一個新的追蹤週期。

Jump to

Keyboard shortcuts

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