Documentation ¶
Overview ¶
Package opentracing provides wrappers for OpenTracing
Index ¶
- func NewCallWrapper(ot opentracing.Tracer) client.CallWrapper
- func NewClientWrapper(ot opentracing.Tracer) client.Wrapper
- func NewHandlerWrapper(ot opentracing.Tracer) server.HandlerWrapper
- func NewSubscriberWrapper(ot opentracing.Tracer) server.SubscriberWrapper
- func SpanFromContext(ctx context.Context, tracer opentracing.Tracer, name string, ...) (context.Context, opentracing.Span, error)
- func StartSpanFromContext(ctx context.Context, tracer opentracing.Tracer, name string, ...) (context.Context, opentracing.Span, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCallWrapper ¶
func NewCallWrapper(ot opentracing.Tracer) client.CallWrapper
NewCallWrapper accepts an opentracing Tracer and returns a Call Wrapper
func NewClientWrapper ¶
NewClientWrapper accepts an open tracing Trace and returns a Client Wrapper
func NewHandlerWrapper ¶
func NewHandlerWrapper(ot opentracing.Tracer) server.HandlerWrapper
NewHandlerWrapper accepts an opentracing Tracer and returns a Handler Wrapper
func NewSubscriberWrapper ¶
func NewSubscriberWrapper(ot opentracing.Tracer) server.SubscriberWrapper
NewSubscriberWrapper accepts an opentracing Tracer and returns a Subscriber Wrapper
func SpanFromContext ¶
func SpanFromContext(ctx context.Context, tracer opentracing.Tracer, name string, opts ...opentracing.StartSpanOption) (context.Context, opentracing.Span, error)
SpanFromContext returns a new span with the given operation name and options. 如果没在context中没有找到span,返回nil
func StartSpanFromContext ¶
func StartSpanFromContext(ctx context.Context, tracer opentracing.Tracer, name string, opts ...opentracing.StartSpanOption) (context.Context, opentracing.Span, error)
StartSpanFromContext returns a new span with the given operation name and options. If a span is found in the context, it will be used as the parent of the resulting span.
Types ¶
This section is empty.