Documentation ¶
Index ¶
- type Collector
- type Recorder
- type Tracer
- func (t *Tracer) ClientInterceptor() grpc.UnaryClientInterceptor
- func (t *Tracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
- func (t *Tracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
- func (t *Tracer) ServerInterceptor() grpc.UnaryServerInterceptor
- func (t *Tracer) StartChildSpan(operationName string, parent opentracing.Span) opentracing.Span
- func (t *Tracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
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 (*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 會建立一個新的追蹤週期。
Click to show internal directories.
Click to hide internal directories.